Bruno Jesus : msvfw32: Allow ICInfo to enumerate codecs when fccType is zero.
Alexandre Julliard
julliard at winehq.org
Tue Nov 22 16:34:01 CST 2016
Module: wine
Branch: master
Commit: ca2420c0ea4e7cc56520e07fd4c1e18e46de503e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca2420c0ea4e7cc56520e07fd4c1e18e46de503e
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Tue Nov 22 03:52:54 2016 -0200
msvfw32: Allow ICInfo to enumerate codecs when fccType is zero.
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvfw32/msvideo_main.c | 4 ++--
dlls/msvfw32/tests/msvfw.c | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c
index 0ae33ed..8ed6917 100644
--- a/dlls/msvfw32/msvideo_main.c
+++ b/dlls/msvfw32/msvideo_main.c
@@ -248,7 +248,7 @@ static BOOL enum_drivers(DWORD fccType, enum_handler_t handler, void* param)
lRet = RegEnumValueA(hKey, i++, buf, &name, 0, &type, (LPBYTE)(buf+name), &data);
if (lRet == ERROR_NO_MORE_ITEMS) break;
if (lRet != ERROR_SUCCESS) continue;
- if (name != 9 || strncasecmp(buf, fccTypeStr, 5)) continue;
+ if (fccType && (name != 9 || strncasecmp(buf, fccTypeStr, 5))) continue;
buf[name] = '=';
if ((result = handler(buf, cnt++, param))) break;
}
@@ -262,7 +262,7 @@ static BOOL enum_drivers(DWORD fccType, enum_handler_t handler, void* param)
for (s = buf; *s; s += strlen(s) + 1)
{
TRACE("got %s\n", s);
- if (strncasecmp(s, fccTypeStr, 5) || s[9] != '=') continue;
+ if (fccType && (strncasecmp(s, fccTypeStr, 5) || s[9] != '=')) continue;
if ((result = handler(s, cnt++, param))) break;
}
}
diff --git a/dlls/msvfw32/tests/msvfw.c b/dlls/msvfw32/tests/msvfw.c
index 507d003..d621da2 100644
--- a/dlls/msvfw32/tests/msvfw.c
+++ b/dlls/msvfw32/tests/msvfw.c
@@ -318,7 +318,6 @@ todo_wine
"ICInfo failed on fcc 0x%08x using uppercase fccHandler\n", info.fccHandler);
}
}
-todo_wine
ok(found != 0, "expected at least one codec\n");
}
More information about the wine-cvs
mailing list