From 4195a345a51e52337bc972aacbce0fd6e88ebb5d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 17 Jan 2016 18:07:50 +0100 Subject: player: refactor: eliminate MPContext.d_video Eventually we want the VO be driven by a A->V filter, so a decoder doesn't even have to exist. Some features definitely require a decoder though (like reporting the decoder in use, hardware decoding, etc.), so for each thing which accessed d_video, it has to be redecided if and how it can access decoder state. At least the "framedrop" property slightly changes semantics: you can now always set this property, even if no video is active. Some untested changes in this commit, but our bio-based distributed test suite has to take care of this. --- player/screenshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/screenshot.c') diff --git a/player/screenshot.c b/player/screenshot.c index 3fc0b90c98..4ab0653fd4 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -345,8 +345,8 @@ static struct mp_image *screenshot_get(struct MPContext *mpctx, int mode) } } - if (image && mpctx->d_video && mpctx->d_video->hwdec_info) { - struct mp_hwdec_ctx *ctx = mpctx->d_video->hwdec_info->hwctx; + if (image && mpctx->vo_chain && mpctx->vo_chain->hwdec_info) { + struct mp_hwdec_ctx *ctx = mpctx->vo_chain->hwdec_info->hwctx; struct mp_image *nimage = NULL; if (ctx && ctx->download_image && (image->fmt.flags & MP_IMGFLAG_HWACCEL)) nimage = ctx->download_image(ctx, image, NULL); -- cgit v1.2.3