Mercurial > libavcodec.hg
diff v210x.c @ 10396:2bb3882075b6 libavcodec
Call release_buffer on close for v210dec and v210x
author | reimar |
---|---|
date | Tue, 13 Oct 2009 18:31:22 +0000 |
parents | 2f804e0a17fc |
children | d7ed9dcc78e3 |
line wrap: on
line diff
--- a/v210x.c Tue Oct 13 18:28:37 2009 +0000 +++ b/v210x.c Tue Oct 13 18:31:22 2009 +0000 @@ -124,6 +124,16 @@ return avpkt->size; } +static av_cold int decode_close(AVCodecContext *avctx) +{ + AVFrame *pic = avctx->coded_frame; + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + av_freep(&avctx->coded_frame); + + return 0; +} + AVCodec v210x_decoder = { "v210x", CODEC_TYPE_VIDEO, @@ -131,7 +141,7 @@ 0, decode_init, NULL, - NULL, + decode_close, decode_frame, CODEC_CAP_DR1, };