diff options
Diffstat (limited to 'video/out/opengl/hwdec_dxva2egl.c')
-rw-r--r-- | video/out/opengl/hwdec_dxva2egl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_dxva2egl.c b/video/out/opengl/hwdec_dxva2egl.c index 197d25b9b0..d870d982cd 100644 --- a/video/out/opengl/hwdec_dxva2egl.c +++ b/video/out/opengl/hwdec_dxva2egl.c @@ -183,6 +183,12 @@ static int init(struct ra_hwdec *hw) .av_device_ref = d3d9_wrap_device_ref((IDirect3DDevice9 *)p->device9ex), .hw_imgfmt = IMGFMT_DXVA2, }; + + if (!p->hwctx.av_device_ref) { + MP_VERBOSE(hw, "Failed to create hwdevice_ctx\n"); + goto fail; + } + hwdec_devices_add(hw->devs, &p->hwctx); return 0; |