[FFmpeg-devel] [PATCH 13/17] avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure

Michael Niedermayer michael at niedermayer.cc
Mon May 27 02:52:25 EEST 2024


Fixes: CID1591939 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavdevice/dshow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 911b0ecc078..557cf33161e 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -1465,7 +1465,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum,
         av_log(avctx, AV_LOG_ERROR, "Could not create CaptureGraphBuilder2\n");
         goto error;
     }
-    ICaptureGraphBuilder2_SetFiltergraph(graph_builder2, graph);
+    r = ICaptureGraphBuilder2_SetFiltergraph(graph_builder2, graph);
     if (r != S_OK) {
         av_log(avctx, AV_LOG_ERROR, "Could not set graph for CaptureGraphBuilder2\n");
         goto error;
-- 
2.45.1



More information about the ffmpeg-devel mailing list