[vlc-devel] [PATCH] d3d11va: fix a crash when we can't allocate the	decoding texture
    Steve Lhomme 
    robux4 at videolabs.io
       
    Sat Jan 30 09:26:38 CET 2016
    
    
  
From: Steve Lhomme <robux4 at gmail.com>
---
 modules/codec/avcodec/d3d11va.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 865fcb7..f7e27d9 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -822,6 +822,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, const video_forma
     hr = ID3D11Device_CreateTexture2D( (ID3D11Device*) dx_sys->d3ddev, &texDesc, NULL, &p_texture );
     if (FAILED(hr)) {
         msg_Err(va, "CreateTexture2D %d failed. (hr=0x%0lx)", dx_sys->surface_count, hr);
+        dx_sys->surface_count = 0;
         return VLC_EGENERIC;
     }
 
-- 
2.6.0.windows.1
    
    
More information about the vlc-devel
mailing list