From ebb9c55a6f11d70e16dca4dd3d05ae36fb5737b6 Mon Sep 17 00:00:00 2001
From: Nikolas Bowe <nbowe@google.com>
Date: Mon, 4 Feb 2019 17:31:08 -0800
Subject: [PATCH] avformat/movenc: Fix muxing EAC3 with delay_moov
You are of course correct
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@google.com>
---
libavformat/movenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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,7 @@ static void mov_free(AVFormatContext *s)
av_freep(&mov->tracks[i].vos_data);
ff_mov_cenc_free(&mov->tracks[i].cenc);
+ av_freep(&mov->tracks[i].eac3_priv);
}
av_freep(&mov->tracks);
--
2.20.1.611.gfbb209baf1-goog