diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-15 10:18:24 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-04-24 16:56:06 +0200 |
commit | d8bc37f1f446d5798d77830e197f02188919a313 (patch) | |
tree | b26d4bf56ce70ff651c73d61d3460e806fbf7167 /fftools | |
parent | 37547e3acd2438d5af170308f5653b48d3747425 (diff) | |
download | ffmpeg-d8bc37f1f446d5798d77830e197f02188919a313.tar.gz |
fftools/ffmpeg: stop using InputStream.pts in ts_discontinuity_detect()
ts_discontinuity_detect() is applied right after demuxing, while
InputStream.pts is a post-decoding timestamp, which may be delayed with
respect to demuxing by an arbitrary amount (e.g. depending on the thread
count when frame threading is used).
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index c73064af9a..a498a68b20 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2091,7 +2091,7 @@ static void ts_discontinuity_detect(InputFile *ifile, InputStream *ist, int64_t delta = pkt_dts - ist->next_dts; if (fmt_is_discont) { if (FFABS(delta) > 1LL * dts_delta_threshold * AV_TIME_BASE || - pkt_dts + AV_TIME_BASE/10 < FFMAX(ist->pts, ist->dts)) { + pkt_dts + AV_TIME_BASE/10 < ist->dts) { ifile->ts_offset_discont -= delta; av_log(NULL, AV_LOG_WARNING, "timestamp discontinuity for stream #%d:%d " |