Browse Source

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>
tags/n0.11
Aaron Colwell Ronald S. Bultje 13 years ago
parent
commit
30011bf201
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/vp8.c

+ 1
- 1
libavcodec/vp8.c View File

@@ -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…
Cancel
Save