[vlc-commits] d3d11_filters: fix the second processor texture not setting up a ProcessorInputView
    Steve Lhomme 
    git at videolan.org
       
    Fri Jul 27 13:09:59 CEST 2018
    
    
  
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 27 13:05:57 2018 +0200| [0a2332aa8c3bddd59fe4b00d01fa710102006c5a] | committer: Steve Lhomme
d3d11_filters: fix the second processor texture not setting up a ProcessorInputView
And the first one being used twice.
Also make sure we don't try to release NULL input even though it should
not ever be possible.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a2332aa8c3bddd59fe4b00d01fa710102006c5a
---
 modules/hw/d3d11/d3d11_filters.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index 7dd801e39c..d33921155e 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -474,7 +474,7 @@ static int D3D11OpenAdjust(vlc_object_t *obj)
         }
 
         hr = ID3D11VideoDevice_CreateVideoProcessorInputView(sys->d3d_proc.d3dviddev,
-                                                             sys->out[0].resource,
+                                                             sys->out[i].resource,
                                                              sys->d3d_proc.procEnumerator,
                                                              &inDesc,
                                                              &sys->procInput[i]);
@@ -526,8 +526,10 @@ static void D3D11CloseAdjust(vlc_object_t *obj)
 
     for (int i=0; i<PROCESSOR_SLICES; i++)
     {
-        ID3D11VideoProcessorInputView_Release(sys->procInput[i]);
-        ID3D11VideoProcessorOutputView_Release(sys->procOutput[i]);
+        if (sys->procInput[i])
+            ID3D11VideoProcessorInputView_Release(sys->procInput[i]);
+        if (sys->procOutput[i])
+            ID3D11VideoProcessorOutputView_Release(sys->procOutput[i]);
     }
     ID3D11Texture2D_Release(sys->out[0].texture);
     ID3D11Texture2D_Release(sys->out[1].texture);
    
    
More information about the vlc-commits
mailing list