mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
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).
This commit is contained in:
parent
37547e3acd
commit
d8bc37f1f4
@ -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 "
|
||||
|
Loading…
x
Reference in New Issue
Block a user