Zebediah Figura : msvfw32: Enumerate installed functions in ICInfo().
Alexandre Julliard
julliard at winehq.org
Thu Mar 7 16:27:58 CST 2019
Module: wine
Branch: master
Commit: da4331584c9dd6a140eac364c2ba2e3f0778548a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=da4331584c9dd6a140eac364c2ba2e3f0778548a
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Mar 6 21:10:23 2019 -0600
msvfw32: Enumerate installed functions in ICInfo().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvfw32/msvideo_main.c | 9 +++++++++
dlls/msvfw32/tests/msvfw.c | 6 ------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c
index 6631060..d42b109 100644
--- a/dlls/msvfw32/msvideo_main.c
+++ b/dlls/msvfw32/msvideo_main.c
@@ -271,6 +271,7 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
{
char name_buf[10], buf[2048];
DWORD ret_type, ret_handler;
+ reg_driver *driver;
DWORD i, count = 0;
LONG res;
HKEY key;
@@ -326,6 +327,14 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
}
}
+ LIST_FOR_EACH_ENTRY(driver, ®_driver_list, reg_driver, entry)
+ {
+ if (type && compare_fourcc(type, driver->fccType)) continue;
+ if (compare_fourcc(handler, driver->fccHandler) && handler != count++) continue;
+ if (driver->proc(0, NULL, ICM_GETINFO, (DWORD_PTR)info, sizeof(*info)) == sizeof(*info))
+ return TRUE;
+ }
+
info->fccType = type;
info->fccHandler = handler;
WARN("No driver found for codec %s.%s.\n", wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler));
diff --git a/dlls/msvfw32/tests/msvfw.c b/dlls/msvfw32/tests/msvfw.c
index bb54d43..33fca56 100644
--- a/dlls/msvfw32/tests/msvfw.c
+++ b/dlls/msvfw32/tests/msvfw.c
@@ -429,13 +429,10 @@ todo_wine
memset(&enum_info, 0x55, sizeof(enum_info));
enum_info.dwSize = sizeof(enum_info);
-todo_wine {
ok(ICInfo(test_type, test_handler, &enum_info), "Expected success.\n");
ok(!enum_info.fccType, "Got unexpected type %#x.\n", enum_info.fccType);
ok(!enum_info.fccHandler, "Got unexpected handler %#x.\n", enum_info.fccHandler);
-}
ok(!enum_info.dwFlags, "Got unexpected flags %#x.\n", enum_info.dwFlags);
-todo_wine
ok(enum_info.dwVersion == 0xdeadbeef, "Got unexpected version %#x.\n", enum_info.dwVersion);
ok(enum_info.dwVersionICM == ICVERSION, "Got unexpected ICM version %#x.\n", enum_info.dwVersionICM);
ok(!enum_info.szName[0], "Got unexpected name %s.\n", wine_dbgstr_w(enum_info.szName));
@@ -445,13 +442,10 @@ todo_wine
/* Functions installed after msvfw32 is loaded are enumerated. */
memset(&enum_info, 0x55, sizeof(enum_info));
enum_info.dwSize = sizeof(enum_info);
-todo_wine {
ok(ICInfo(test_type, 0, &enum_info), "Expected success.\n");
ok(!enum_info.fccType, "Got unexpected type %#x.\n", enum_info.fccType);
-}
ok(!enum_info.fccHandler, "Got unexpected handler %#x.\n", enum_info.fccHandler);
ok(!enum_info.dwFlags, "Got unexpected flags %#x.\n", enum_info.dwFlags);
-todo_wine
ok(enum_info.dwVersion == 0xdeadbeef, "Got unexpected version %#x.\n", enum_info.dwVersion);
ok(enum_info.dwVersionICM == ICVERSION, "Got unexpected ICM version %#x.\n", enum_info.dwVersionICM);
ok(!enum_info.szName[0], "Got unexpected name %s.\n", wine_dbgstr_w(enum_info.szName));
More information about the wine-cvs
mailing list