summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorJonas Zetterberg <jozz@jozz.se>2014-02-02 13:25:02 +0000
committerwm4 <wm4@nowhere>2014-02-10 22:10:56 +0100
commit1fcdf2d849e22b52303a0add79444d4a4a2510fc (patch)
tree06f5d673fc80403ed37f57c84732a0028b2a1b82 /video
parentc60c784a6af4b7fc035a8015c1d14febf8ecb83c (diff)
downloadmpv-1fcdf2d849e22b52303a0add79444d4a4a2510fc.tar.bz2
mpv-1fcdf2d849e22b52303a0add79444d4a4a2510fc.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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 5acd3f9530..1045572aa4 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.);