diff options
author | wm4 <wm4@nowhere> | 2015-04-07 10:17:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-07 10:17:54 +0200 |
commit | f316f1ec16fa32c055d8d96613d466d01436fe87 (patch) | |
tree | c1237a629b744f365b299919bb2fb6d3545a5d65 /player | |
parent | edef17fcb7c454ca4cf7a1d8d2a6c0973fa291dd (diff) | |
download | mpv-f316f1ec16fa32c055d8d96613d466d01436fe87.tar.bz2 mpv-f316f1ec16fa32c055d8d96613d466d01436fe87.tar.xz |
screenshot: use GPU readback only for hardware decoded images
Avoids a confusing message printed by the vdpau code when taking a
screenshot while using software decoding (because obviously GPU readback
won't work on normal in-memory video frames).
Diffstat (limited to 'player')
-rw-r--r-- | player/screenshot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/screenshot.c b/player/screenshot.c index 27ef468544..4e80934494 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -349,7 +349,7 @@ 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; struct mp_image *nimage = NULL; - if (ctx && ctx->download_image) + if (ctx && ctx->download_image && (image->fmt.flags & MP_IMGFLAG_HWACCEL)) nimage = ctx->download_image(ctx, image, NULL); if (nimage) { talloc_free(image); |