ffmpeg | branch: release/0.10 | Aaron Colwell <acolw...@chromium.org> | Sun Mar 18 20:03:00 2012 -0700| [57c36de7265761dd94fb6bb4a9180011f796128f] | committer: Diego Biurrun
vp8: avoid race condition on segment map. This change avoids accessing the segment map of the previous frame if segmentation is not enabled for the current frame. The caller of decode_mb_mode() only calls ff_thread_await_progress() on the reference segmentation index array if segmentation is enabled, so Chromium's TSAN will report a race when accessing this data while segmentation is not enabled. Signed-off-by: Ronald S. Bultje <rsbul...@gmail.com> (cherry picked from commit 30011bf20109eef1a0f9ee949b19f9998ad88663) Signed-off-by: Diego Biurrun <di...@biurrun.de> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57c36de7265761dd94fb6bb4a9180011f796128f --- libavcodec/vp8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index a16f5ca..0b6d818 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -642,7 +642,7 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_ if (s->segmentation.update_map) *segment = vp8_rac_get_tree(c, vp8_segmentid_tree, s->prob->segmentid); - else + else if (s->segmentation.enabled) *segment = ref ? *ref : *segment; s->segment = *segment; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog