[FFmpeg-cvslog] nuv: Reset the frame on resize

Luca Barbato git at videolan.org
Tue Aug 27 19:23:50 CEST 2013


ffmpeg | branch: release/1.1 | Luca Barbato <lu_zero at gentoo.org> | Tue Aug 13 06:01:48 2013 +0200| [082e3fd4693c22e4a35326954f226424eaa7db24] | committer: Luca Barbato

nuv: Reset the frame on resize

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=082e3fd4693c22e4a35326954f226424eaa7db24
---

 libavcodec/nuv.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index d742df3..9c765a0 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);



More information about the ffmpeg-cvslog mailing list