diff options
author | wm4 <wm4@nowhere> | 2015-11-28 15:45:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-28 15:45:49 +0100 |
commit | 318e9801f2ac649ecc6c7d4fb83c7c46fa5b581d (patch) | |
tree | 260cc91d0f59942ce625fdc54b76e3e74f18348b /player | |
parent | ea1caa474a1b469791129c75e587f3ad837e450d (diff) |
vo_opengl: fix interpolation with display-sync
At least I hope so.
Deriving the duration from the pts was not really correct. It doesn't
include speed adjustments, and becomes completely wrong of the user e.g.
changes the playback speed by a huge amount. Pass through the accurate
duration value by adding a new vo_frame field.
The value for vsync_offset was not correct either. We don't need the
error for the next frame, but the error for the current one. This wasn't
noticed because it makes no difference in symmetric cases, like 24 fps
on 60 Hz.
I'm still not entirely confident in the correctness of this, but it sure
is an improvement.
Also, remove the MP_STATS() calls - they're not really useful to debug
anything anymore.
Diffstat (limited to 'player')
-rw-r--r-- | player/video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index 6d04685953..91899dc451 100644 --- a/player/video.c +++ b/player/video.c @@ -1046,7 +1046,8 @@ static void handle_display_sync_frame(struct MPContext *mpctx, mpctx->time_frame = time_left; frame->vsync_interval = vsync; - frame->vsync_offset = mpctx->display_sync_error; + frame->vsync_offset = -prev_error; + frame->ideal_frame_duration = frame_duration; frame->num_vsyncs = num_vsyncs; frame->display_synced = true; |