[vlc-commits] direct3d11: fix crash when resource allocation fails

Steve Lhomme git at videolan.org
Tue Aug 7 09:12:54 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Aug  1 14:09:12 2018 +0200| [98de307c0aecd357dd24cb429c80730a8961d8f5] | committer: Steve Lhomme

direct3d11: fix crash when resource allocation fails

We release the staging picture twice which is not supported.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=98de307c0aecd357dd24cb429c80730a8961d8f5
---

 modules/video_output/win32/direct3d11.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 792c8e5365..d9834bb8c7 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1613,7 +1613,6 @@ static int Direct3D11Open(vout_display_t *vd)
 
     if (Direct3D11CreateGenericResources(vd)) {
         msg_Err(vd, "Failed to allocate resources");
-        Direct3D11DestroyResources(vd);
         return VLC_EGENERIC;
     }
 
@@ -1688,7 +1687,6 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt)
 
     if (Direct3D11CreateFormatResources(vd, fmt)) {
         msg_Err(vd, "Failed to allocate format resources");
-        Direct3D11DestroyResources(vd);
         return VLC_EGENERIC;
     }
 



More information about the vlc-commits mailing list