ffmpeg | branch: master | Zhao Zhili <zhiliz...@tencent.com> | Thu Apr 17 
20:12:49 2025 +0800| [ca964ba139695fc0064d07ac6503626d549520c7] | 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 <zhiliz...@tencent.com>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 452690090c..cb81b6c4da 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -10703,7 +10703,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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to