[FFmpeg-cvslog] avformat/mov: Reduce seek when interleaved_read is disabled

Zhao Zhili git at videolan.org
Mon May 12 07:00:22 EEST 2025


ffmpeg | branch: release/7.1 | Zhao Zhili <zhilizhao at tencent.com> | Thu Apr 17 20:12:49 2025 +0800| [9237125e51a4ecae76dc476b620e8e492c7aaf8b] | committer: Zhao Zhili

avformat/mov: Reduce seek when interleaved_read is disabled

Don't select sample with small dts when interleaved_read is disabled.

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
(cherry picked from commit ca964ba139695fc0064d07ac6503626d549520c7)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9237125e51a4ecae76dc476b620e8e492c7aaf8b
---

 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 41ca280c8a..97a9cfecae 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -10449,7 +10449,7 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
                 ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) &&
                  ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && dts != AV_NOPTS_VALUE &&
                  ((dtsdiff <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
-                  (dtsdiff > AV_TIME_BASE && dts < best_dts)))))) {
+                  (dtsdiff > AV_TIME_BASE && dts < best_dts && mov->interleaved_read)))))) {
                 sample = current_sample;
                 best_dts = dts;
                 *st = avst;



More information about the ffmpeg-cvslog mailing list