From 7cd555dfa54a9b9b83749977e7eec3f023ff2b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sat, 16 Nov 2013 00:11:24 +0100 Subject: [PATCH] avcodec/vp9: make last_invisible local. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original change by one of these developers: Anton Khirnov Diego Biurrun Luca Barbato Martin Storsjö See 97962b2 / 72ca830 --- libavcodec/vp9.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index d738482f88..05af2e8d60 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -98,7 +98,7 @@ typedef struct VP9Context { // bitstream header uint8_t profile; uint8_t keyframe, last_keyframe; - uint8_t invisible, last_invisible; + uint8_t invisible; uint8_t use_last_frame_mvs; uint8_t errorres; uint8_t colorspace; @@ -359,6 +359,7 @@ static int decode_frame_header(AVCodecContext *ctx, { VP9Context *s = ctx->priv_data; int c, i, j, k, l, m, n, w, h, max, size2, res, sharp; + int last_invisible; const uint8_t *data2; /* general header */ @@ -381,11 +382,11 @@ static int decode_frame_header(AVCodecContext *ctx, } s->last_keyframe = s->keyframe; s->keyframe = !get_bits1(&s->gb); - s->last_invisible = s->invisible; + last_invisible = s->invisible; s->invisible = !get_bits1(&s->gb); s->errorres = get_bits1(&s->gb); // FIXME disable this upon resolution change - s->use_last_frame_mvs = !s->errorres && !s->last_invisible; + s->use_last_frame_mvs = !s->errorres && !last_invisible; if (s->keyframe) { if (get_bits_long(&s->gb, 24) != VP9_SYNCCODE) { // synccode av_log(ctx, AV_LOG_ERROR, "Invalid sync code\n");