From 6499224888c79eff236e97e0e63efa261d95d9b9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 8 Oct 2015 22:06:15 +0200 Subject: vo: log deviation from ideal vsync interval --- video/out/vo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video/out/vo.c b/video/out/vo.c index 12083e4784..759fe92227 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -21,6 +21,7 @@ #include #include #include +#include #ifndef __MINGW32__ #include @@ -750,6 +751,10 @@ static bool render_frame(struct vo *vo) if (in->current_frame && in->current_frame->display_synced && continuous && in->vsync_interval_approx > in->vsync_interval * 3 / 2) in->missed_count += 1; + + double diff = (in->vsync_interval - in->vsync_interval_approx) / 1e6; + if (fabs(diff) < 0.150) + MP_STATS(vo, "value %f vsync-diff", diff); } if (!in->dropped_frame) { -- cgit v1.2.3