aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-02 12:21:12 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-04 09:33:44 -0400
commiteaff36c973af2807606b5277343fc9e237add24f (patch)
tree4da600203f0b701f59692b783dc93a8a7fe5f7ec
parent8d25a11dc79c11880e0f03722344dddd95a90f43 (diff)
downloadffmpeg-eaff36c973af2807606b5277343fc9e237add24f.tar.gz
vp9: fix segmentation map retention if segmentation is turned off.
-rw-r--r--libavcodec/vp9.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index c80468601c..3eff1f180b 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -3997,8 +3997,9 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
int size = pkt->size;
VP9Context *s = ctx->priv_data;
int res, tile_row, tile_col, i, ref, row, col;
- int retain_segmap_ref = s->segmentation.enabled && !s->segmentation.update_map
- && s->frames[REF_FRAME_SEGMAP].segmentation_map;
+ int retain_segmap_ref = s->frames[REF_FRAME_SEGMAP].segmentation_map &&
+ !(s->segmentation.enabled &&
+ (s->segmentation.update_map || s->keyframe || s->intraonly));
ptrdiff_t yoff, uvoff, ls_y, ls_uv;
AVFrame *f;
int bytesperpixel;
@@ -4330,6 +4331,7 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo
s->invisible = ssrc->invisible;
s->keyframe = ssrc->keyframe;
+ s->intraonly = ssrc->intraonly;
s->ss_v = ssrc->ss_v;
s->ss_h = ssrc->ss_h;
s->segmentation.enabled = ssrc->segmentation.enabled;