[vlc-devel] [PATCH] d3d11_fmt: fix crash when the feature level doesn't match
Steve Lhomme
robux4 at videolabs.io
Wed Oct 18 13:56:33 CEST 2017
Also log the feature level as hexadecimal, it's easier to read.
Fixes #18941
---
modules/video_chroma/d3d11_fmt.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 0939ab4846..f3782004a2 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -212,11 +212,12 @@ static inline HRESULT D3D11_CreateDevice(vlc_object_t *obj, HINSTANCE hdecoder_d
/* we can work with legacy levels but only if forced */
if ( obj->obj.force || i_feature_level >= D3D_FEATURE_LEVEL_11_1 )
break;
- msg_Dbg(obj, "Incompatible feature level %i", i_feature_level);
+ msg_Dbg(obj, "Incompatible feature level %x", i_feature_level);
ID3D11DeviceContext_Release(*pp_d3dcontext);
*pp_d3dcontext = NULL;
ID3D11Device_Release(*pp_d3ddevice);
*pp_d3ddevice = NULL;
+ hr = E_NOTIMPL;
}
}
return hr;
--
2.14.2
More information about the vlc-devel
mailing list