nuv: Reset the frame on resize
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 13 Aug 2013 04:01:48 +0000 (06:01 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 24 Aug 2013 14:46:50 +0000 (16:46 +0200)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/nuv.c

index d742df3..9c765a0 100644 (file)
@@ -137,6 +137,8 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height,
             c->decomp_buf = ptr;
         ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height,
                               c->lq, c->cq);
+        if (c->pic.data[0])
+            avctx->release_buffer(avctx, &c->pic);
     } else if (quality != c->quality)
         ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height,
                               c->lq, c->cq);