Damjan Jovanovic : devenum: Iterate over all avicap devices instead of giving up at the first failure.

Alexandre Julliard julliard at winehq.org
Fri Apr 26 15:31:03 CDT 2019


Module: wine
Branch: master
Commit: 779633acde995ceffdc4fd509fc023f0d8493d29
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=779633acde995ceffdc4fd509fc023f0d8493d29

Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date:   Tue Apr 23 03:15:23 2019 +0200

devenum: Iterate over all avicap devices instead of giving up at the first failure.

Some /dev/video* device nodes aren't capture devices, so
capGetDriverDescriptionW() will fail for them, but there
could still be valid ones later on. Iterate over all 10
instead of giving up at the first failure.

Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/devenum/createdevenum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
index 3f986f7..83ff3b4 100644
--- a/dlls/devenum/createdevenum.c
+++ b/dlls/devenum/createdevenum.c
@@ -793,7 +793,7 @@ static void register_avicap_devices(void)
     {
         if (!capGetDriverDescriptionW(i, friendlyname, ARRAY_SIZE(friendlyname),
                 version, ARRAY_SIZE(version)))
-            break;
+            continue;
 
         name[5] = '0' + i;
 




More information about the wine-cvs mailing list