diff options
Diffstat (limited to 'libavcodec/loco.c')
-rw-r--r-- | libavcodec/loco.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/loco.c b/libavcodec/loco.c index 4fd64f4bda..9a01810c44 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -275,6 +275,17 @@ static av_cold int decode_init(AVCodecContext *avctx){ return 0; } +static av_cold int decode_end(AVCodecContext *avctx){ + LOCOContext * const l = avctx->priv_data; + AVFrame *pic = &l->pic; + + if (pic->data[0]) + avctx->release_buffer(avctx, pic); + av_freep(&l->pic); + + return 0; +} + AVCodec loco_decoder = { "loco", CODEC_TYPE_VIDEO, @@ -282,7 +293,7 @@ AVCodec loco_decoder = { sizeof(LOCOContext), decode_init, NULL, - NULL, + decode_end, decode_frame, CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("LOCO"), |