[PATCH v2 2/2] msvfw32: Set fccType in ICInfo().
Zebediah Figura
z.figura12 at gmail.com
Tue Feb 13 13:00:05 CST 2018
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
Fixes https://bugs.winehq.org/show_bug.cgi?id=44489
dlls/msvfw32/msvideo_main.c | 1 +
dlls/msvfw32/tests/msvfw.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c
index e071d95..5dc99a4 100644
--- a/dlls/msvfw32/msvideo_main.c
+++ b/dlls/msvfw32/msvideo_main.c
@@ -303,6 +303,7 @@ static BOOL ICInfo_enum_handler(const char *name, const char *driver, unsigned i
if (lpicinfo->fccHandler != nr && compare_fourcc(lpicinfo->fccHandler, fccHandler))
return FALSE;
+ lpicinfo->fccType = fccType;
lpicinfo->fccHandler = fccHandler;
lpicinfo->dwFlags = 0;
lpicinfo->dwVersion = 0;
diff --git a/dlls/msvfw32/tests/msvfw.c b/dlls/msvfw32/tests/msvfw.c
index c6fe0f2..beeca9f 100644
--- a/dlls/msvfw32/tests/msvfw.c
+++ b/dlls/msvfw32/tests/msvfw.c
@@ -294,6 +294,7 @@ static void test_ICInfo(void)
for (i = found = 0; ICInfo(0, i, &info); i++)
{
trace("Codec name: %s, fccHandler: 0x%08x\n", wine_dbgstr_w(info.szName), info.fccHandler);
+ ok(info.fccType, "expected nonzero fccType\n");
ok(ICInfo(info.fccType, info.fccHandler, &info2),
"ICInfo failed on fcc 0x%08x\n", info.fccHandler);
@@ -308,6 +309,11 @@ static void test_ICInfo(void)
"ICInfo failed on fcc 0x%08x\n", info.fccHandler);
}
ok(found != 0, "expected at least one codec\n");
+
+ memset(&info, 0, sizeof(info));
+ ok(!ICInfo(ICTYPE_VIDEO, mmioFOURCC('f','a','k','e'), &info), "expected failure\n");
+ ok(info.fccType == ICTYPE_VIDEO, "got 0x%08x\n", info.fccType);
+ ok(info.fccHandler == mmioFOURCC('f','a','k','e'), "got 0x%08x\n", info.fccHandler);
}
START_TEST(msvfw)
--
2.7.4
More information about the wine-devel
mailing list