Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-06 08:23:32 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-10 23:12:02 +0300
commitb15fcdfe5c724f3e0a8b28e6b4f8c9ef0c3ad6fe (patch)
tree630ff0558c990e9bbc3ccaefb93718bd0b36bfb9 /libavcodec/vmdvideo.c
parent8b32a6f1aa244aba3647b035899c644ba775782e (diff)
avcodec/vmdvideo: Cleanup generically upon init failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vmdvideo.c')
-rw-r--r--libavcodec/vmdvideo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/vmdvideo.c b/libavcodec/vmdvideo.c
index 15846919d8..ad88a43ae3 100644
--- a/libavcodec/vmdvideo.c
+++ b/libavcodec/vmdvideo.c
@@ -423,10 +423,8 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
}
s->prev_frame = av_frame_alloc();
- if (!s->prev_frame) {
- vmdvideo_decode_end(avctx);
+ if (!s->prev_frame)
return AVERROR(ENOMEM);
- }
return 0;
}
@@ -477,4 +475,5 @@ const AVCodec ff_vmdvideo_decoder = {
.close = vmdvideo_decode_end,
.decode = vmdvideo_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};