mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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 <rsbultje@gmail.com>
This commit is contained in:
parent
18ba94c6f9
commit
30011bf201
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user