diff options
author | Dale Curtis <[email protected]> | 2020-05-14 14:38:07 -0700 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2020-06-14 22:02:34 +0200 |
commit | 8dee726b1a5c82c5e6578a606b299c6fdc74c142 (patch) | |
tree | 8aad9beaa119db382e21d038c81393c2f5cc3dbf | |
parent | dba8e32e444e72c273bdc04a57dfb4c5a67388e7 (diff) |
avformat/mov: Check if DTS is AV_NOPTS_VALUE in mov_find_next_sample().
Signed-off-by: Dale Curtis <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit bf446711bc8b7f316771870b8d4dc4dd65f5d94b)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index e11c9f4457..2fc27d2aec 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7776,7 +7776,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; |