[FFmpeg-devel] [PATCH 1/2] avformat/movenc: Fix skip_trailer when global_sidx is enabled

Karthick J kjeyapal at akamai.com
Sun Mar 24 14:30:21 EET 2019


---
 libavformat/movenc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8969d5b170..f46cbc5ea5 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -6745,9 +6745,8 @@ static int mov_write_trailer(AVFormatContext *s)
             avio_seek(pb, mov->reserved_header_pos, SEEK_SET);
             mov_write_sidx_tags(pb, mov, -1, 0);
             avio_seek(pb, end, SEEK_SET);
-            avio_write_marker(s->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_TRAILER);
-            mov_write_mfra_tag(pb, mov);
-        } else if (!(mov->flags & FF_MOV_FLAG_SKIP_TRAILER)) {
+        }
+        if (!(mov->flags & FF_MOV_FLAG_SKIP_TRAILER)) {
             avio_write_marker(s->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_TRAILER);
             mov_write_mfra_tag(pb, mov);
         }
-- 
2.17.2 (Apple Git-113)



More information about the ffmpeg-devel mailing list