avdevice/dshow: Check ICaptureGraphBuilder2_SetFiltergraph() for failure

Fixes: CID1591939 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 6 months ago
parent 86cd7c68bc
commit 4c285bb278
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      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;

Loading…
Cancel
Save