diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-06-19 20:32:44 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-06-26 19:07:29 +0200 |
commit | 4dfc2c50c18de74e73e3283773c1792b8a4b5a77 (patch) | |
tree | 3a08dc939ca03575b09fecbcd20ed8f7541a4ab0 /video/out/opengl/hwdec_d3d11egl.c | |
parent | a5b929026100b7508d8fee6dbbea42f3a5db05fc (diff) | |
download | mpv-4dfc2c50c18de74e73e3283773c1792b8a4b5a77.tar.bz2 mpv-4dfc2c50c18de74e73e3283773c1792b8a4b5a77.tar.xz |
hwdec: do not add hwdec device if it failed to create
Diffstat (limited to 'video/out/opengl/hwdec_d3d11egl.c')
-rw-r--r-- | video/out/opengl/hwdec_d3d11egl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c index 84b985906c..c3120914ea 100644 --- a/video/out/opengl/hwdec_d3d11egl.c +++ b/video/out/opengl/hwdec_d3d11egl.c @@ -185,6 +185,12 @@ static int init(struct ra_hwdec *hw) .supported_formats = subfmts, .hw_imgfmt = IMGFMT_D3D11, }; + + if (!p->hwctx.av_device_ref) { + MP_VERBOSE(hw, "Failed to create hwdevice_ctx\n"); + return -1; + } + hwdec_devices_add(hw->devs, &p->hwctx); return 0; |