Browse Source

avformat/movenc: Fix segfault upon allocation error

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
4106013523
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/movenc.c

+ 3
- 0
libavformat/movenc.c View File

@@ -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) {
if (mov->tracks[mov->chapter_track].par)
av_freep(&mov->tracks[mov->chapter_track].par->extradata);


Loading…
Cancel
Save