dxva2: prevent outputting native surfaces with HWDEC_DXVA2_COPY (again)

Not quite sure when/why exactly this was broken.
This commit is contained in:
wm4
2016-03-17 09:47:09 +01:00
parent 71642f5d23
commit a993cdc481
+2 -1
View File
@@ -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++) {