summaryrefslogtreecommitdiffstats
path: root/video/out/d3d11/hwdec_dxva2dxgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/d3d11/hwdec_dxva2dxgi.c')
-rw-r--r--video/out/d3d11/hwdec_dxva2dxgi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/d3d11/hwdec_dxva2dxgi.c b/video/out/d3d11/hwdec_dxva2dxgi.c
index f68e0e3065..62158d467b 100644
--- a/video/out/d3d11/hwdec_dxva2dxgi.c
+++ b/video/out/d3d11/hwdec_dxva2dxgi.c
@@ -136,6 +136,12 @@ static int init(struct ra_hwdec *hw)
.av_device_ref = d3d9_wrap_device_ref((IDirect3DDevice9 *)p->dev9),
.hw_imgfmt = IMGFMT_DXVA2,
};
+
+ if (!p->hwctx.av_device_ref) {
+ MP_VERBOSE(hw, "Failed to create hwdevice_ctx\n");
+ goto done;
+ }
+
hwdec_devices_add(hw->devs, &p->hwctx);
ret = 0;