[FFmpeg-devel] [PATCH] avformat/movenc: Fix segfault upon allocation error
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Mon Sep 28 18:14:18 EEST 2020
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
libavformat/movenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 63adae5e0a..a90bbfa458 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -6254,6 +6254,9 @@ static void mov_free(AVFormatContext *s)
MOVMuxContext *mov = s->priv_data;
int i;
+ if (!mov->tracks)
+ return;
+
if (mov->chapter_track) {
avcodec_parameters_free(&mov->tracks[mov->chapter_track].par);
}
--
2.25.1
More information about the ffmpeg-devel
mailing list