From 54f15bd3779041aef105aa51c491065ae722bb09 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Nov 2013 15:06:29 +0100 Subject: video: restore printing warning on decreasing filter PTS Recently, the check was moved, so it was printed only for source video PTS (since that's easier, and filters should normally behave sane). But it turns out it's trivial to print a warning in the filter case too by reusing the code that normally checks for PTS forward jumps without needing any additional code, so, fine, restore warning in this case. --- mpvcore/player/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpvcore/player/video.c b/mpvcore/player/video.c index daa98c55f6..c422b6997e 100644 --- a/mpvcore/player/video.c +++ b/mpvcore/player/video.c @@ -327,8 +327,8 @@ double update_video(struct MPContext *mpctx, double endpts) double last_pts = mpctx->video_next_pts; if (last_pts == MP_NOPTS_VALUE) last_pts = pts; - double frame_time = MPMAX(0, pts - last_pts); - if (frame_time >= 60) { + double frame_time = pts - last_pts; + if (frame_time < 0 || frame_time >= 60) { // Assume a PTS difference >= 60 seconds is a discontinuity. MP_WARN(mpctx, "Jump in video pts: %f -> %f\n", last_pts, pts); frame_time = 0; -- cgit v1.2.3