From 5536ebe82faf021ebb3cff73e0cd42d113094321 Mon Sep 17 00:00:00 2001 From: Jonas Zetterberg Date: Sun, 2 Feb 2014 13:25:02 +0000 Subject: vo_vdpau: Discard zero timestamps Some drivers do not supply timestamps, use old timestamp in these conditions. --- video/out/vo_vdpau.c | 3 +++ 1 file changed, 3 insertions(+) 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.); -- cgit v1.2.3