diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-08-13 06:01:48 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-10-16 23:05:51 +0200 |
commit | abb41f19cc10fea09fb16d9ecc9967b2a78cf7b0 (patch) | |
tree | f13c7979d809ebff6a3198fdf690d1c1328ec287 | |
parent | c1ebdef01b016b24b8ec322efdbc31da2639addd (diff) | |
download | ffmpeg-abb41f19cc10fea09fb16d9ecc9967b2a78cf7b0.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>
Conflicts:
libavcodec/nuv.c
-rw-r--r-- | libavcodec/nuv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 8545d863d9..ea5e9ee042 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -129,6 +129,8 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit } else c->decomp_buf = ptr; 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) rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); return 0; |