diff options
author | Jonas Zetterberg <jozz@jozz.se> | 2014-02-02 13:25:02 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-10 22:10:56 +0100 |
commit | 1fcdf2d849e22b52303a0add79444d4a4a2510fc (patch) | |
tree | 06f5d673fc80403ed37f57c84732a0028b2a1b82 | |
parent | c60c784a6af4b7fc035a8015c1d14febf8ecb83c (diff) | |
download | mpv-1fcdf2d849e22b52303a0add79444d4a4a2510fc.tar.bz2 mpv-1fcdf2d849e22b52303a0add79444d4a4a2510fc.tar.xz |
vo_vdpau: Discard zero timestamps
Some drivers do not supply timestamps, use old timestamp in these conditions.
-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 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.); |