summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-11-16 04:33:34 +0100
committerDudemanguy <random342@airmail.cc>2023-11-18 22:54:29 +0000
commit8dbc84dc167b369d6e7bcb01ff08599870f94255 (patch)
treeee4f9dbd813e6a966afc859348000b8e6778b698 /video
parentba5071a7ef225da20fb2a525a555ef4f6ba86049 (diff)
downloadmpv-8dbc84dc167b369d6e7bcb01ff08599870f94255.tar.bz2
mpv-8dbc84dc167b369d6e7bcb01ff08599870f94255.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_gpu_next.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index f079d7570e..440a324031 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -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");