X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Findeo3.c;h=75113a75419d648860fbc442ef9dae89e3859276;hb=7e5034f97e41d3f8112c1f8da3b5274ab99ef6f8;hp=71d478c9fc5b98c0db1a95de8178f307c3a6323d;hpb=0a319bcce5714f7183b0537892f7d37d7a31493a;p=ffmpeg diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 71d478c9fc5..75113a75419 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -203,10 +203,8 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, ctx->planes[p].buffers[0] = av_malloc(!p ? luma_size : chroma_size); ctx->planes[p].buffers[1] = av_malloc(!p ? luma_size : chroma_size); - if (!ctx->planes[p].buffers[0] || !ctx->planes[p].buffers[1]) { - free_frame_buffers(ctx); + if (!ctx->planes[p].buffers[0] || !ctx->planes[p].buffers[1]) return AVERROR(ENOMEM); - } /* fill the INTRA prediction lines with the middle pixel value = 64 */ memset(ctx->planes[p].buffers[0], 0x40, ctx->planes[p].pitch); @@ -1143,4 +1141,5 @@ AVCodec ff_indeo3_decoder = { .close = decode_close, .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };