diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index edb38c303ecc426ebde4eb1c2df40473989554b0..36c64fb44c24cbfe6b06613046ed85ca55defa85 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -138,6 +138,7 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, } ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq); + av_frame_unref(&c->pic); return 1; } else if (quality != c->quality) ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height,