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

Steve Lhomme git at videolan.org
Wed Aug 1 15:16:42 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Aug  1 14:09:12 2018 +0200| [eb400a4deb7baf4f6dbb93d05f9e331a4e363c78] | 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.git/?a=commit;h=eb400a4deb7baf4f6dbb93d05f9e331a4e363c78
---

 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 009281c4be..72f3954c6e 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1246,7 +1246,6 @@ static int Direct3D11Open(vout_display_t *vd)
 
     if (Direct3D11CreateGenericResources(vd)) {
         msg_Err(vd, "Failed to allocate resources");
-        Direct3D11DestroyResources(vd);
         return VLC_EGENERIC;
     }
 
@@ -1323,7 +1322,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