[FFmpeg-cvslog] avformat/sierravmd: Simplify cleanup after read_header failure
Andreas Rheinhardt
git at videolan.org
Thu Jul 8 16:45:21 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Mar 21 18:31:06 2020 +0100| [1ebda24904d786a1d57093da3d6a1eec5ea939a4] | committer: Andreas Rheinhardt
avformat/sierravmd: Simplify cleanup after read_header failure
by setting the FF_FMT_INIT_CLEANUP flag.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ebda24904d786a1d57093da3d6a1eec5ea939a4
---
libavformat/sierravmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index 13304b0596..e35faae50d 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -252,16 +252,13 @@ static int vmd_read_header(AVFormatContext *s)
}
}
- av_free(raw_frame_table);
vmd->current_frame = 0;
vmd->frame_count = total_frames;
- return 0;
-
+ ret = 0;
error:
av_freep(&raw_frame_table);
- av_freep(&vmd->frame_table);
return ret;
}
@@ -321,6 +318,7 @@ const AVInputFormat ff_vmd_demuxer = {
.name = "vmd",
.long_name = NULL_IF_CONFIG_SMALL("Sierra VMD"),
.priv_data_size = sizeof(VmdDemuxContext),
+ .flags_internal = FF_FMT_INIT_CLEANUP,
.read_probe = vmd_probe,
.read_header = vmd_read_header,
.read_packet = vmd_read_packet,
More information about the ffmpeg-cvslog
mailing list