From 678cbd8a78e28e19de7644dcbb75088e2b2400bf Mon Sep 17 00:00:00 2001
From: FearThe1337 <git@fearthe1337.com>
Date: Sat, 13 Feb 2016 16:55:02 +0100
Subject: [PATCH] libavdevice/dshow.c: Correct CoGetMalloc check

Current if statement would always be false due to assigning the value of
S_OK which equals 0.

Signed-off-by: FearThe1337 <git@fearthe1337.com>
---
 libavdevice/dshow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index b280bc3..f56c165 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -240,7 +240,7 @@ dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum,
         int i;
 
         r = CoGetMalloc(1, &co_malloc);
-        if (r = S_OK)
+        if (r != S_OK)
             goto fail1;
         r = CreateBindCtx(0, &bind_ctx);
         if (r != S_OK)
-- 
1.9.5.msysgit.0

