[vlc-commits] d3d11_filters: fix the second processor texture not setting up a ProcessorInputView

Steve Lhomme git at videolan.org
Fri Jul 27 13:26:42 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 27 13:05:57 2018 +0200| [e2a4b1b577dcab173e91f88b6355902c9b7dfc4a] | committer: Jean-Baptiste Kempf

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.

(cherry picked from commit 0a2332aa8c3bddd59fe4b00d01fa710102006c5a)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 cc12e1f53c..e8e543fdbf 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -551,7 +551,7 @@ static int D3D11OpenAdjust(vlc_object_t *obj)
         }
 
         hr = ID3D11VideoDevice_CreateVideoProcessorInputView(sys->d3dviddev,
-                                                             sys->out[0].resource,
+                                                             sys->out[i].resource,
                                                              processorEnumerator,
                                                              &inDesc,
                                                              &sys->procInput[i]);
@@ -612,8 +612,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