mirror of https://github.com/mpv-player/mpv
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:
parent
ba5071a7ef
commit
8dbc84dc16
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue