[FFmpeg-devel] [PATCH] avformat/movenc: Fix muxing EAC3 with delay_moov
Nikolas Bowe
nbowe at google.com
Tue Feb 5 04:11:35 EET 2019
When using delay_moov mov_write_moov_tag gets called multiple times. Therefore we need to keep eac3_priv around for subsequent calls.
Signed-off-by: Nikolas Bowe <nbowe at google.com>
---
libavformat/movenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 65be2968a1..ba811ddbc3 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -579,7 +579,6 @@ static int mov_write_eac3_tag(AVIOContext *pb, MOVTrack *track)
end:
av_packet_unref(&info->pkt);
- av_freep(&track->eac3_priv);
return size;
}
@@ -5956,6 +5955,9 @@ static void mov_free(AVFormatContext *s)
av_freep(&mov->tracks[i].vos_data);
ff_mov_cenc_free(&mov->tracks[i].cenc);
+
+ if (mov->tracks[i].eac3_priv)
+ av_freep(&mov->tracks[i].eac3_priv);
}
av_freep(&mov->tracks);
--
2.20.1.611.gfbb209baf1-goog
More information about the ffmpeg-devel
mailing list