Merge commit '57c36de7265761dd94fb6bb4a9180011f796128f' into release/0.10
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Mar 2015 20:29:31 +0000 (21:29 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Mar 2015 20:29:31 +0000 (21:29 +0100)
* commit '57c36de7265761dd94fb6bb4a9180011f796128f':
  vp8: avoid race condition on segment map.

Conflicts:
libavcodec/vp8.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/vp8.c

@@@ -640,10 -640,9 +640,10 @@@ void decode_mb_mode(VP8Context *s, VP8M
  {
      VP56RangeCoder *c = &s->c;
  
 -    if (s->segmentation.update_map)
 -        *segment = vp8_rac_get_tree(c, vp8_segmentid_tree, s->prob->segmentid);
 -    else if (s->segmentation.enabled)
 +    if (s->segmentation.update_map) {
 +        int bit  = vp56_rac_get_prob(c, s->prob->segmentid[0]);
 +        *segment = vp56_rac_get_prob(c, s->prob->segmentid[1+bit]) + 2*bit;
-     } else
++    } else if (s->segmentation.enabled)
          *segment = ref ? *ref : *segment;
      s->segment = *segment;