X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fescape130.c;h=67373c34705da01e93b00378e684cab1f955f990;hb=90262f3fb4afe4b903888e45cc40e2116cb69683;hp=1dd7eedd74bcd2fb1f911a94c0c74a5b937be489;hpb=ecb5546e97c479378e057f527cc1d79a46c31cb1;p=ffmpeg diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c index 1dd7eedd74b..67373c34705 100644 --- a/libavcodec/escape130.c +++ b/libavcodec/escape130.c @@ -128,9 +128,6 @@ static av_cold int escape130_decode_init(AVCodecContext *avctx) s->buf1 = av_malloc(avctx->width * avctx->height * 3 / 2); s->buf2 = av_malloc(avctx->width * avctx->height * 3 / 2); if (!s->old_y_avg || !s->buf1 || !s->buf2) { - av_freep(&s->old_y_avg); - av_freep(&s->buf1); - av_freep(&s->buf2); av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n"); return AVERROR(ENOMEM); } @@ -348,7 +345,7 @@ static int escape130_decode_frame(AVCodecContext *avctx, void *data, return buf_size; } -AVCodec ff_escape130_decoder = { +const AVCodec ff_escape130_decoder = { .name = "escape130", .long_name = NULL_IF_CONFIG_SMALL("Escape 130"), .type = AVMEDIA_TYPE_VIDEO, @@ -358,4 +355,5 @@ AVCodec ff_escape130_decoder = { .close = escape130_decode_close, .decode = escape130_decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };