[FFmpeg-cvslog] avformat/mov: Check if DTS is AV_NOPTS_VALUE in mov_find_next_sample().

Dale Curtis git at videolan.org
Tue Jul 7 21:40:47 EEST 2020


ffmpeg | branch: release/4.2 | Dale Curtis <dalecurtis at chromium.org> | Thu May 14 14:38:07 2020 -0700| [361416218a2d3b4d83209b4ca5e36419cfd5eeb0] | committer: Michael Niedermayer

avformat/mov: Check if DTS is AV_NOPTS_VALUE in mov_find_next_sample().

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit bf446711bc8b7f316771870b8d4dc4dd65f5d94b)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index da0d90733f..f363ea7b10 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7624,7 +7624,7 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
             av_log(s, AV_LOG_TRACE, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
             if (!sample || (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL) && current_sample->pos < sample->pos) ||
                 ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) &&
-                 ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
+                 ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && dts != AV_NOPTS_VALUE &&
                  ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
                   (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
                 sample = current_sample;



More information about the ffmpeg-cvslog mailing list