[FFmpeg-devel] [PATCH 3/3] avformat/movenc: set delay_moov flag when writing DASH

James Almer jamrial at gmail.com
Wed Nov 20 22:27:05 EET 2024


Instead of expecting the DASH muxer manually setting this, just do it here.
This is required to write a simple edit list for audio tracks with triming
samples, where negative CTS offsets can't be used.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/movenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 94f068ebe1..6dcfbe52d7 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -7642,7 +7642,7 @@ static int mov_init(AVFormatContext *s)
                       FF_MOV_FLAG_FRAGMENT | FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS;
     if (mov->flags & FF_MOV_FLAG_DASH)
         mov->flags |= FF_MOV_FLAG_FRAGMENT | FF_MOV_FLAG_EMPTY_MOOV |
-                      FF_MOV_FLAG_DEFAULT_BASE_MOOF;
+                      FF_MOV_FLAG_DEFAULT_BASE_MOOF | FF_MOV_FLAG_DELAY_MOOV;
     if (mov->flags & FF_MOV_FLAG_CMAF)
         mov->flags |= FF_MOV_FLAG_FRAGMENT | FF_MOV_FLAG_EMPTY_MOOV |
                       FF_MOV_FLAG_DEFAULT_BASE_MOOF | FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS;
-- 
2.47.0



More information about the ffmpeg-devel mailing list