You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/vmdvideo: Cleanup generically upon init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -423,10 +423,8 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
s->prev_frame = av_frame_alloc();
|
s->prev_frame = av_frame_alloc();
|
||||||
if (!s->prev_frame) {
|
if (!s->prev_frame)
|
||||||
vmdvideo_decode_end(avctx);
|
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -477,4 +475,5 @@ const AVCodec ff_vmdvideo_decoder = {
|
|||||||
.close = vmdvideo_decode_end,
|
.close = vmdvideo_decode_end,
|
||||||
.decode = vmdvideo_decode_frame,
|
.decode = vmdvideo_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.capabilities = AV_CODEC_CAP_DR1,
|
||||||
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user