aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-08-13 06:01:48 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-08-24 16:46:50 +0200
commit082e3fd4693c22e4a35326954f226424eaa7db24 (patch)
tree23b0da01621bf64963c1835242088e6954243474
parent747c320a190ae86021484e09c9add8d221b950d7 (diff)
downloadffmpeg-082e3fd4693c22e4a35326954f226424eaa7db24.tar.gz
nuv: Reset the frame on resize
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r--libavcodec/nuv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index d742df3bac..9c765a0f64 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -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);