direct3d11: fix crash when resource allocation fails
authorSteve Lhomme <robux4@ycbcr.xyz>
Wed, 1 Aug 2018 12:09:12 +0000 (14:09 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Wed, 1 Aug 2018 13:16:22 +0000 (15:16 +0200)
We release the staging picture twice which is not supported.

modules/video_output/win32/direct3d11.c

index 009281c..72f3954 100644 (file)
@@ -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;
     }