[ffmpeg] branch master updated. ae03b629db avformat/mov: Merge tts after building index for old-style uncompressed PCM
The branch, master has been updated via ae03b629db116a8a5b6b40ede912fbb8b1ca0175 (commit) from 03c054d43c594211b89d5b2931430dccd7424d58 (commit) - Log ----------------------------------------------------------------- commit ae03b629db116a8a5b6b40ede912fbb8b1ca0175 Author: Derek Buitenhuis <derek.buitenhuis@gmail.com> AuthorDate: Mon Sep 22 20:00:54 2025 +0100 Commit: Derek Buitenhuis <derek.buitenhuis@gmail.com> CommitDate: Tue Sep 23 14:39:13 2025 +0100 avformat/mov: Merge tts after building index for old-style uncompressed PCM This was a regression introduced in 292c1df7c159c8a1a7afe52613d164ff417e81ce. Since we don't know the length of the stts data until after building the index, since we're generating it, we need to merge any ctts data after, since otherwise tts_count is set to 0, and no packets will be output. We can't remove the merge entirely, because uncompressed PCM with a ctts atom is technically valid (e.g. a constant CTS offset). This fixes old-style uncompressed PCM demuxing. Fixes #11490. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> diff --git a/libavformat/mov.c b/libavformat/mov.c index 216c6a5442..7fe4678234 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4841,10 +4841,6 @@ static void mov_build_index(MOVContext *mov, AVStream *st) if (!sc->chunk_count || sc->tts_count) return; - ret = mov_merge_tts_data(mov, st, MOV_MERGE_CTTS); - if (ret < 0) - return; - // compute total chunk count for (i = 0; i < sc->stsc_count; i++) { unsigned count, chunk_count; @@ -4939,6 +4935,10 @@ static void mov_build_index(MOVContext *mov, AVStream *st) chunk_samples -= samples; } } + + ret = mov_merge_tts_data(mov, st, MOV_MERGE_CTTS); + if (ret < 0) + return; } if (!mov->ignore_editlist && mov->advanced_editlist) { ----------------------------------------------------------------------- Summary of changes: libavformat/mov.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive --
participants (1)
-
ffmpeg-git@ffmpeg.org