summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-17 09:47:09 +0100
committerwm4 <wm4@nowhere>2016-03-17 09:47:09 +0100
commita993cdc48156e0bcf10d90880d77a35ac0b9feaa (patch)
tree86b2e0bb7bfd7b2306da9a7249c61fa58dd6a630 /video/decode
parent71642f5d23ed4ae78172977ab46030e1f967b674 (diff)
downloadmpv-a993cdc48156e0bcf10d90880d77a35ac0b9feaa.tar.bz2
mpv-a993cdc48156e0bcf10d90880d77a35ac0b9feaa.tar.xz
dxva2: prevent outputting native surfaces with HWDEC_DXVA2_COPY (again)
Not quite sure when/why exactly this was broken.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/dxva2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c
index d4ce0c72b3..d255cb7b1a 100644
--- a/video/decode/dxva2.c
+++ b/video/decode/dxva2.c
@@ -629,7 +629,8 @@ static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
hwdec_request_api(info, "dxva2");
// dxva2-copy can do without external context; dxva2 requires it.
if (hwdec->type != HWDEC_DXVA2_COPY) {
- if (!info || !info->hwctx || !info->hwctx->d3d_ctx)
+ if (!info || !info->hwctx || !info->hwctx->d3d_ctx ||
+ info->hwctx->type == HWDEC_DXVA2_COPY)
return HWDEC_ERR_NO_CTX;
}
for (int i = 0; dxva2_modes[i].guid; i++) {