From bf5fd7a5cfaf7230a64e647651207abecb569d33 Mon Sep 17 00:00:00 2001 From: Jens Frederich Date: Mon, 15 Jul 2024 06:51:29 +0000 Subject: [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present The search of the current DirectShow device list has been customized so that audio devices are always found even if no video device is connected. Signed-off-by: Jens Frederich Reviewed-by: Roger Pack Signed-off-by: Michael Niedermayer (cherry picked from commit 60b1750134963e8326476c4fbae41cea1772ff5b) Signed-off-by: Michael Niedermayer --- libavdevice/dshow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 023c9db052..506b1fe4dc 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -644,7 +644,7 @@ static int dshow_get_device_list(AVFormatContext *avctx, AVDeviceInfoList *devic } ret = dshow_cycle_devices(avctx, devenum, VideoDevice, VideoSourceDevice, NULL, NULL, &device_list); - if (ret < S_OK) + if (ret < S_OK && ret != AVERROR(EIO)) goto error; ret = dshow_cycle_devices(avctx, devenum, AudioDevice, AudioSourceDevice, NULL, NULL, &device_list);