d3d11_fmt: don't nullify after a release
authorSteve Lhomme <robux4@videolabs.io>
Tue, 20 Jun 2017 08:10:39 +0000 (10:10 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 22 Jun 2017 15:22:47 +0000 (17:22 +0200)
There might be more than one acquire now between the decoder and display

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_chroma/d3d11_fmt.h

index 13e109e..3fdbad2 100644 (file)
@@ -73,27 +73,17 @@ static inline void AcquirePictureSys(picture_sys_t *p_sys)
 static inline void ReleasePictureSys(picture_sys_t *p_sys)
 {
     for (int i=0; i<D3D11_MAX_SHADER_VIEW; i++) {
-        if (p_sys->resourceView[i]) {
+        if (p_sys->resourceView[i])
             ID3D11ShaderResourceView_Release(p_sys->resourceView[i]);
-            p_sys->resourceView[i] = NULL;
-        }
-        if (p_sys->texture[i]) {
+        if (p_sys->texture[i])
             ID3D11Texture2D_Release(p_sys->texture[i]);
-            p_sys->texture[i] = NULL;
-        }
     }
-    if (p_sys->context) {
+    if (p_sys->context)
         ID3D11DeviceContext_Release(p_sys->context);
-        p_sys->context = NULL;
-    }
-    if (p_sys->decoder) {
+    if (p_sys->decoder)
         ID3D11VideoDecoderOutputView_Release(p_sys->decoder);
-        p_sys->decoder = NULL;
-    }
-    if (p_sys->processorInput) {
+    if (p_sys->processorInput)
         ID3D11VideoProcessorInputView_Release(p_sys->processorInput);
-        p_sys->processorInput = NULL;
-    }
 }
 
 /* map texture planes to resource views */