diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index fa945858c2..a2d7e4acc0 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -280,6 +280,10 @@ static int decode_init(AVCodecContext *avctx){ static int decode_end(AVCodecContext *avctx){ QpegContext * const a = avctx->priv_data; + AVFrame * const p= (AVFrame*)&a->pic; + + if(p->data[0]) + avctx->release_buffer(avctx, p); av_free(a->refdata); return 0;