vp9: deal with the case where update_map=0 but we're key/intraonly.
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 2 Sep 2015 15:26:24 +0000 (11:26 -0400)
committerRonald S. Bultje <rsbultje@gmail.com>
Fri, 4 Sep 2015 13:33:44 +0000 (09:33 -0400)
libavcodec/vp9.c

index 7035512..b1cf929 100644 (file)
@@ -1479,7 +1479,8 @@ static void decode_mode(AVCodecContext *ctx)
     if (!s->segmentation.enabled) {
         b->seg_id = 0;
     } else if (s->keyframe || s->intraonly) {
-        b->seg_id = vp8_rac_get_tree(&s->c, vp9_segmentation_tree, s->prob.seg);
+        b->seg_id = !s->segmentation.update_map ? 0 :
+                    vp8_rac_get_tree(&s->c, vp9_segmentation_tree, s->prob.seg);
     } else if (!s->segmentation.update_map ||
                (s->segmentation.temporal &&
                 vp56_rac_get_prob_branchy(&s->c,