summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/d3d11/context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c
index 62c0f5772f..f03f93df92 100644
--- a/video/out/d3d11/context.c
+++ b/video/out/d3d11/context.c
@@ -296,8 +296,9 @@ static void d3d11_get_vsync(struct ra_swapchain *sw, struct vo_vsync_info *info)
// Now guess the timestamp of the last submitted frame based on the
// timestamp of the frame at SyncRefreshCount and the frame rate
+ int queued_frames = submit_count - expected_sync_pc;
int64_t last_queue_display_time_qpc = stats.SyncQPCTime.QuadPart +
- (submit_count - expected_sync_pc) * p->vsync_duration_qpc;
+ queued_frames * p->vsync_duration_qpc;
// Only set the estimated display time if it's after the last submission
// time. It could be before if mpv skips a lot of frames.