[FFmpeg-devel] [PATCH] avformat/movenc: Don't free AVCodecParameters manually

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Mon Sep 28 14:33:17 EEST 2020


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/movenc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 20768cd45f..891c833520 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -6255,9 +6255,7 @@ static void mov_free(AVFormatContext *s)
     int i;
 
     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_paramters_free(&mov_tracks[mov->chapter_track].par);
     }
 
     for (i = 0; i < mov->nb_streams; i++) {
-- 
2.25.1



More information about the ffmpeg-devel mailing list