1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

movenc: Check that tracks->enc exists before trying to free extradata

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2013-08-26 10:56:17 +03:00
parent 4d122b01e4
commit 3559fb97c4

View File

@ -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);
}