For inputs from demuxers with AVFMT_TS_DISCONT flag, the existing condition,
delta < -1LL*dts_delta_threshold*AV_TIME_BASE is rendered superflous due to the fixed threshold in pkt_dts + AV_TIME_BASE/10 < FFMAX(ist->pts, ist->dts) This prevents users from setting a high threshold to avoid discontinuity correction due to errant timestamps. Now, the maximum of the two thresholds is used. --- Tested with multiple satellite MPEG-TS inputs. fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0578265c1e..505fef5bdc 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4480,7 +4480,7 @@ static int process_input(int file_index) if (is->iformat->flags & AVFMT_TS_DISCONT) { if (delta < -1LL*dts_delta_threshold*AV_TIME_BASE || delta > 1LL*dts_delta_threshold*AV_TIME_BASE || - pkt_dts + AV_TIME_BASE/10 < FFMAX(ist->pts, ist->dts)) { + pkt_dts + FFMAX(AV_TIME_BASE/10, dts_delta_threshold*AV_TIME_BASE) < FFMAX(ist->pts, ist->dts)) { ifile->ts_offset -= delta; av_log(NULL, AV_LOG_DEBUG, "timestamp discontinuity for stream #%d:%d " -- 2.26.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".