[vlc-devel] [PATCH] direct3d11: avoid crashing later in the decoder
Steve Lhomme
robux4 at videolabs.io
Thu Oct 20 15:17:11 CEST 2016
ID3D11VideoDevice::CreateVideoDecoderOutputView() crashes when the texture has
more than 30 slices. Luckily we never need more than that.
--
fix https://patches.videolan.org/patch/14758/ the limit is 30
---
modules/video_output/win32/direct3d11.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index d551e15..887a7f9 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -553,6 +553,11 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
if ( vd->sys->pool != NULL )
return vd->sys->pool;
+ if (pool_size > 30) {
+ msg_Err(vd, "Avoid crashing when using ID3D11VideoDecoderOutputView with too many slices");
+ return NULL;
+ }
+
#ifdef HAVE_ID3D11VIDEODECODER
picture_t** pictures = NULL;
unsigned picture_count = 0;
--
2.7.2.windows.1
More information about the vlc-devel
mailing list