From 6435d9ae7f3afe88ad2dbaad378335185acecd38 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 20 Apr 2018 17:05:53 +0200 Subject: vo_gpu: move some extra code for screenshot to video.c This also happens to fix some UB on the error path (target being declared after the first "goto done;"). --- video/out/vo_gpu.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'video/out/vo_gpu.c') diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c index 61696af0e4..a80ba233c2 100644 --- a/video/out/vo_gpu.c +++ b/video/out/vo_gpu.c @@ -178,15 +178,8 @@ static int control(struct vo *vo, uint32_t request, void *data) return VO_TRUE; case VOCTRL_SCREENSHOT: { struct vo_frame *frame = vo_get_current_vo_frame(vo); - if (frame) { - // Disable interpolation and such. - frame->redraw = true; - frame->repeat = false; - frame->still = true; - frame->pts = 0; - frame->duration = -1; + if (frame) gl_video_screenshot(p->renderer, frame, data); - } talloc_free(frame); return true; } -- cgit v1.2.3