avformat/movenc: Fix segfault upon allocation error

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/353/head^2
Andreas Rheinhardt 4 years ago
parent 24352ca792
commit 4106013523
  1. 3
      libavformat/movenc.c

@ -6254,6 +6254,9 @@ static void mov_free(AVFormatContext *s)
MOVMuxContext *mov = s->priv_data; MOVMuxContext *mov = s->priv_data;
int i; int i;
if (!mov->tracks)
return;
if (mov->chapter_track) { if (mov->chapter_track) {
if (mov->tracks[mov->chapter_track].par) if (mov->tracks[mov->chapter_track].par)
av_freep(&mov->tracks[mov->chapter_track].par->extradata); av_freep(&mov->tracks[mov->chapter_track].par->extradata);

Loading…
Cancel
Save