summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-14 19:58:07 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-19 18:47:27 +0200
commit3507ab07ecafb107574161bd7a2225616329816d (patch)
tree5139426ba330c833cc00e9b22e60fafbcfbf492d /libavcodec/indeo3.c
parentab4876163bc8173d5bc12e068283ee790672e8b8 (diff)
avcodec/indeo3: Cleanup generically after init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 71d478c9fc..75113a7541 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,
};