[FFmpeg-cvslog] movenc: Check that tracks->enc exists before trying to free extradata
Martin Storsjö
git at videolan.org
Tue Aug 27 12:41:28 CEST 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Aug 26 10:56:17 2013 +0300| [3559fb97c459c88b4f1d0eef80d55933d3b7fabe] | committer: Martin Storsjö
movenc: Check that tracks->enc exists before trying to free extradata
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3559fb97c459c88b4f1d0eef80d55933d3b7fabe
---
libavformat/movenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index dc13a4b..cebdca9 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);
}
More information about the ffmpeg-cvslog
mailing list