Commit 30011bf2 authored by Aaron Colwell's avatar Aaron Colwell Committed by Ronald S. Bultje

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: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 18ba94c6
......@@ -641,7 +641,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment