[PATCH 2/3] msvfw32: Allow ICInfo to enumerate codecs when fccType is zero
Bruno Jesus
00cpxxx at gmail.com
Mon Nov 21 23:52:54 CST 2016
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
---
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");
}
--
2.9.3
More information about the wine-patches
mailing list