avformat/movenc: Fix segfault upon allocation error
Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
24352ca792
commit
4106013523
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue