aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-08-26 10:56:17 +0300
committerMartin Storsjö <martin@martin.st>2013-08-27 10:26:07 +0300
commit3559fb97c459c88b4f1d0eef80d55933d3b7fabe (patch)
treee27ccd1e27064e404d7a04478af02d1877d28d29
parent4d122b01e4ce539269ee2df193b061772c7374f6 (diff)
downloadffmpeg-3559fb97c459c88b4f1d0eef80d55933d3b7fabe.tar.gz
movenc: Check that tracks->enc exists before trying to free extradata
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/movenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index dc13a4be0e..cebdca9860 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3470,7 +3470,8 @@ static int mov_write_trailer(AVFormatContext *s)
}
if (mov->chapter_track) {
- av_free(mov->tracks[mov->chapter_track].enc->extradata);
+ if (mov->tracks[mov->chapter_track].enc)
+ av_free(mov->tracks[mov->chapter_track].enc->extradata);
av_freep(&mov->tracks[mov->chapter_track].enc);
}