From 7023c383b22a9619840b88175a8c272f2f9d4414 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Nov 2015 22:04:44 +0100 Subject: vo: change vo_frame field units This was just converting back and forth between int64_t/microseconds and double/seconds. Remove this stupidity. The pts/duration fields are still in microseconds, but they have no meaning in the display-sync case (also drop printing the pts field from opengl/video.c - it's always 0). --- player/video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 561bb0b202..682ead6944 100644 --- a/player/video.c +++ b/player/video.c @@ -992,7 +992,6 @@ static void handle_display_sync_frame(struct MPContext *mpctx, int num_vsyncs = MPMAX(lrint(ratio), 0); double prev_error = mpctx->display_sync_error; mpctx->display_sync_error += frame_duration - num_vsyncs * vsync; - frame->vsync_offset = mpctx->display_sync_error * 1e6; MP_DBG(mpctx, "s=%f vsyncs=%d dur=%f ratio=%f err=%.20f (%f/%f)\n", mpctx->speed_factor_v, num_vsyncs, adjusted_duration, ratio, @@ -1046,6 +1045,8 @@ static void handle_display_sync_frame(struct MPContext *mpctx, // A bad guess, only needed when reverting to audio sync. mpctx->time_frame = time_left; + frame->vsync_interval = vsync; + frame->vsync_offset = mpctx->display_sync_error; frame->num_vsyncs = num_vsyncs; frame->display_synced = true; -- cgit v1.2.3