From 0336bbf68a047854308e812fc21f45e00aff6ed0 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 28 Sep 2020 13:30:07 +0200 Subject: [PATCH] avformat/movenc: Don't free AVCodecParameters manually Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index a8333953bc..7256eb2a0f 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -6263,9 +6263,7 @@ static void mov_free(AVFormatContext *s) return; if (mov->chapter_track) { - if (mov->tracks[mov->chapter_track].par) - av_freep(&mov->tracks[mov->chapter_track].par->extradata); - av_freep(&mov->tracks[mov->chapter_track].par); + avcodec_parameters_free(&mov->tracks[mov->chapter_track].par); } for (i = 0; i < mov->nb_streams; i++) {