diff options
Diffstat (limited to 'libavcodec/xl.c')
-rw-r--r-- | libavcodec/xl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/xl.c b/libavcodec/xl.c index fb4241f255..277e92a678 100644 --- a/libavcodec/xl.c +++ b/libavcodec/xl.c @@ -128,6 +128,17 @@ static av_cold int decode_init(AVCodecContext *avctx){ return 0; } +static av_cold int decode_end(AVCodecContext *avctx){ + VideoXLContext * const a = avctx->priv_data; + AVFrame *pic = &a->pic; + + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + av_freep(&a->pic); + + return 0; +} + AVCodec xl_decoder = { "xl", CODEC_TYPE_VIDEO, @@ -135,7 +146,7 @@ AVCodec xl_decoder = { sizeof(VideoXLContext), decode_init, NULL, - NULL, + decode_end, decode_frame, CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"), |