1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

vo_gpu_next: disable drift compensation for screenshots

This change prevents unwanted adjustments. Generally, screenshots
shouldn't invoke pl_queue_update, as this action could cull the already
mapped frames in the queue.
This commit is contained in:
Kacper Michajłow 2023-11-16 04:33:34 +01:00 committed by Dudemanguy
parent ba5071a7ef
commit 8dbc84dc16

View File

@ -1232,7 +1232,12 @@ static void video_screenshot(struct vo *vo, struct voctrl_screenshot *args)
// Retrieve the current frame from the frame queue
struct pl_frame_mix mix;
enum pl_queue_status status;
status = pl_queue_update(p->queue, &mix, pl_queue_params(.pts = p->last_pts));
status = pl_queue_update(p->queue, &mix, pl_queue_params(
.pts = p->last_pts,
#if PL_API_VER >= 340
.drift_compensation = 0,
#endif
));
assert(status != PL_QUEUE_EOF);
if (status == PL_QUEUE_ERR) {
MP_ERR(vo, "Unknown error occurred while trying to take screenshot!\n");