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
This commit is contained in:
Luca Barbato
2013-08-13 06:01:48 +02:00
parent c1ebdef01b
commit abb41f19cc

View File

@@ -129,6 +129,8 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit
} else } else
c->decomp_buf = ptr; c->decomp_buf = ptr;
rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); 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) } else if (quality != c->quality)
rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
return 0; return 0;