diff options
author | wm4 <wm4@nowhere> | 2018-04-20 17:05:53 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-04-20 17:05:53 +0200 |
commit | 6435d9ae7f3afe88ad2dbaad378335185acecd38 (patch) | |
tree | 51c4a7ade0348a61f34cdfbe91823e58db56d9ed /video/out/vo_gpu.c | |
parent | 2e768ad0d89e6a787187b2831914b46f449d4fc0 (diff) | |
download | mpv-6435d9ae7f3afe88ad2dbaad378335185acecd38.tar.bz2 mpv-6435d9ae7f3afe88ad2dbaad378335185acecd38.tar.xz |
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;").
Diffstat (limited to 'video/out/vo_gpu.c')
-rw-r--r-- | video/out/vo_gpu.c | 9 |
1 files changed, 1 insertions, 8 deletions
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; } |