[vlc-commits] d3d11va: fix the VideoProcessor creation failure detection

Steve Lhomme git at videolan.org
Sun Oct 9 10:46:24 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Sep  6 09:26:10 2016 +0200| [ab6358ba79ce06804fabe0ed732bb66229396545] | committer: Jean-Baptiste Kempf

d3d11va: fix the VideoProcessor creation failure detection

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/avcodec/d3d11va.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 1b4bac0..23ef65f 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -790,7 +790,7 @@ static bool SetupProcessor(vlc_va_t *va, const video_format_t *fmt)
     {
         /* shortcut for the rendering output */
         hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator, sys->render, &flags);
-        if (FAILED(hr) && !(flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
+        if (FAILED(hr) || !(flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
             msg_Dbg(va, "processor format %s not supported for output", DxgiFormatToStr(sys->render));
         else
             processorOutput = sys->render;
@@ -814,7 +814,7 @@ static bool SetupProcessor(vlc_va_t *va, const video_format_t *fmt)
 
                 hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(processorEnumerator,
                                                                               output->formatTexture, &flags);
-                if (FAILED(hr) && !(flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
+                if (FAILED(hr) || !(flags & D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT))
                     msg_Dbg(va, "Processor format %s not supported for output", DxgiFormatToStr(output->formatTexture));
                 else
                 {



More information about the vlc-commits mailing list