summaryrefslogtreecommitdiffstats
path: root/player/screenshot.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-17 18:07:50 +0100
committerwm4 <wm4@nowhere>2016-01-17 18:38:07 +0100
commit4195a345a51e52337bc972aacbce0fd6e88ebb5d (patch)
tree267a57310fffe943845d7ce2058447ccd7f7458d /player/screenshot.c
parent004bc9526308c6bc3f51591423e88bb1adaff167 (diff)
downloadmpv-4195a345a51e52337bc972aacbce0fd6e88ebb5d.tar.bz2
mpv-4195a345a51e52337bc972aacbce0fd6e88ebb5d.tar.xz
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.
Diffstat (limited to 'player/screenshot.c')
-rw-r--r--player/screenshot.c4
1 files changed, 2 insertions, 2 deletions
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);