PR #23419 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23419 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23419.patch
Fixes issue #23417 >From 7c1c7fd35016eba2df2f33a260aa25c11fdb62ab Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Tue, 9 Jun 2026 15:19:41 -0300 Subject: [PATCH] avformat/movenc: avoid negative cts offsets when using an edit list with CMAF output Fixes issue #23417. Signed-off-by: James Almer <[email protected]> --- libavformat/movenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b466ba7531..c85b76a3c7 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -8206,6 +8206,9 @@ static int mov_init(AVFormatContext *s) !(mov->flags & FF_MOV_FLAG_DELAY_MOOV) && mov->use_editlist) av_log(s, AV_LOG_WARNING, "No meaningful edit list will be written when using empty_moov without delay_moov\n"); + if (mov->flags & FF_MOV_FLAG_CMAF && mov->use_editlist) + mov->flags &= ~FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS; + if (!mov->use_editlist && s->avoid_negative_ts == AVFMT_AVOID_NEG_TS_AUTO && !(mov->flags & FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS)) s->avoid_negative_ts = AVFMT_AVOID_NEG_TS_MAKE_ZERO; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
