summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-27 22:04:44 +0100
committerwm4 <wm4@nowhere>2015-11-27 22:04:44 +0100
commit7023c383b22a9619840b88175a8c272f2f9d4414 (patch)
tree5bb7828079a20407971c72380f74a3f4164adb5b /player/video.c
parent2bee47fd27f4ee544f1db15fcedf8cd94df89610 (diff)
downloadmpv-7023c383b22a9619840b88175a8c272f2f9d4414.tar.bz2
mpv-7023c383b22a9619840b88175a8c272f2f9d4414.tar.xz
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).
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c3
1 files changed, 2 insertions, 1 deletions
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;