diff options
author | Jonas Zetterberg <jozz@jozz.se> | 2014-02-02 13:25:02 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-12 22:33:29 +0100 |
commit | 5536ebe82faf021ebb3cff73e0cd42d113094321 (patch) | |
tree | ef7f8ded6a139024652ebfe3830157c52bfba774 /video | |
parent | ef8b37ca2a1794d9e09b74f152c4715ce5e0ad25 (diff) | |
download | mpv-5536ebe82faf021ebb3cff73e0cd42d113094321.tar.bz2 mpv-5536ebe82faf021ebb3cff73e0cd42d113094321.tar.xz |
vo_vdpau: Discard zero timestamps
Some drivers do not supply timestamps, use old timestamp in these conditions.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_vdpau.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 13332f0811..11d7650467 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -176,6 +176,9 @@ static int change_vdptime_sync(struct vo *vo, int64_t *t) vdp_time -= (t2 - t1) * 1000ULL; else vdp_time = old; + } else if (!vdp_time) { + /* Some drivers do not return timestamps. */ + vdp_time = old; } MP_DBG(vo, "adjusting VdpTime offset by %f µs\n", (int64_t)(vdp_time - old) / 1000.); |