summaryrefslogtreecommitdiffstats
path: root/video/decode/d3d.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-01 05:26:37 +0100
committerwm4 <wm4@nowhere>2017-12-01 05:57:41 +0100
commit9345964bad6413a94447b3a1c79dca6b878f0ec4 (patch)
tree1f4f00202adc9e28b4fc62de1be180eaf00f6a6b /video/decode/d3d.c
parent7e87feaf15d5ab99473d13856bb247a0ed10e521 (diff)
downloadmpv-9345964bad6413a94447b3a1c79dca6b878f0ec4.tar.bz2
mpv-9345964bad6413a94447b3a1c79dca6b878f0ec4.tar.xz
d3d11: move code for d3d11eglrgb hack
Diffstat (limited to 'video/decode/d3d.c')
-rw-r--r--video/decode/d3d.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c
index c7b2afd470..dcaa0008b2 100644
--- a/video/decode/d3d.c
+++ b/video/decode/d3d.c
@@ -119,6 +119,9 @@ static void d3d11_complete_image_params(struct mp_image *img)
// According to hwcontex_d3d11va.h, this means DXGI_FORMAT_420_OPAQUE.
img->params.hw_flags = hw_frames->sw_format == AV_PIX_FMT_YUV420P
? MP_IMAGE_HW_FLAG_OPAQUE : 0;
+
+ if (img->params.hw_subfmt == IMGFMT_NV12)
+ mp_image_setfmt(img, IMGFMT_D3D11NV12);
}
const struct hwcontext_fns hwcontext_fns_d3d11 = {