diff options
author | Jonas Zetterberg <jozz@jozz.se> | 2014-02-02 11:07:08 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-12 22:33:27 +0100 |
commit | ef8b37ca2a1794d9e09b74f152c4715ce5e0ad25 (patch) | |
tree | 3c0904927fa696a40b0b1609476a107e4edd2534 /video | |
parent | d4a55138479c0343122250a30c210bed91ece4b9 (diff) | |
download | mpv-ef8b37ca2a1794d9e09b74f152c4715ce5e0ad25.tar.bz2 mpv-ef8b37ca2a1794d9e09b74f152c4715ce5e0ad25.tar.xz |
vo_vdpau: Ensure presentation time is within bounds
When a time sync happens the last sync time is the minimum time that can be
used for presentation.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_vdpau.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 43e21209da..13332f0811 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -1064,6 +1064,10 @@ static void flip_page_timed(struct vo *vo, int64_t pts_us, int duration) if (vc->vsync_interval == 1) duration = -1; // Make sure drop logic is disabled + /* If the presentation time may not be before our last timestamp sync. */ + if (pts_us && pts_us < vc->last_sync_update) + pts_us = vc->last_sync_update; + uint64_t now = sync_vdptime(vo); uint64_t pts = pts_us ? convert_to_vdptime(vo, pts_us) : now; uint64_t ideal_pts = pts; |