diff options
author | wm4 <wm4@nowhere> | 2013-11-29 15:06:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-29 15:06:29 +0100 |
commit | 54f15bd3779041aef105aa51c491065ae722bb09 (patch) | |
tree | eed0a65eec6c349202b942cabab46a2ffb2e6a70 /mpvcore/player | |
parent | 9edc2dbcf3859ca5ea517340d97dda9ce934ac7b (diff) | |
download | mpv-54f15bd3779041aef105aa51c491065ae722bb09.tar.bz2 mpv-54f15bd3779041aef105aa51c491065ae722bb09.tar.xz |
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.
Diffstat (limited to 'mpvcore/player')
-rw-r--r-- | mpvcore/player/video.c | 4 |
1 files 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; |