From 28582322207bb962553505f0c25268f4b786287d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 24 Jan 2015 22:56:02 +0100 Subject: vo: simplify VOs by adding generic screenshot support At the time screenshot support was added, images weren't refcounted yet, so screenshots required specialized implementations in the VOs. But now we can handle these things much simpler. Also see commit 5bb24980. If there are VOs in the future which can't do this (e.g. they need to write to the image passed to vo_driver->draw_image), this still could be disabled on a per-VO basis etc., so we lose no potential performance advantages. --- player/screenshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/screenshot.c') diff --git a/player/screenshot.c b/player/screenshot.c index 2a1aaf6746..702e2dd766 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -337,7 +337,7 @@ static struct mp_image *screenshot_get(struct MPContext *mpctx, int mode) vo_wait_frame(mpctx->video_out); // important for each-frame mode if (mode != MODE_FULL_WINDOW) - vo_control(mpctx->video_out, VOCTRL_SCREENSHOT, &image); + image = vo_get_current_frame(mpctx->video_out); if (!image) { vo_control(mpctx->video_out, VOCTRL_SCREENSHOT_WIN, &image); mode = MODE_FULL_WINDOW; -- cgit v1.2.3