Dmitry Timoshkov : winmm: Add another test confirming that mmioDescend does set fccType of non RIFF/ LIST chunks to 0.

Alexandre Julliard julliard at winehq.org
Wed Jun 25 16:44:00 CDT 2008


Module: wine
Branch: master
Commit: 4d2a2860a56532f181dc672f6ecb18b07a07a8af
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4d2a2860a56532f181dc672f6ecb18b07a07a8af

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Wed Jun 25 21:26:42 2008 +0900

winmm: Add another test confirming that mmioDescend does set fccType of non RIFF/LIST chunks to 0.

---

 dlls/winmm/tests/mmio.c |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/dlls/winmm/tests/mmio.c b/dlls/winmm/tests/mmio.c
index 5fac90a..e945891 100644
--- a/dlls/winmm/tests/mmio.c
+++ b/dlls/winmm/tests/mmio.c
@@ -30,9 +30,15 @@
 
 static DWORD RIFF_buf[] =
 {
-    FOURCC_RIFF, 7*sizeof(DWORD)+sizeof(MainAVIHeader), mmioFOURCC('A','V','I',' '),
-    FOURCC_LIST, sizeof(DWORD)+sizeof(MMCKINFO)+sizeof(MainAVIHeader), listtypeAVIHEADER,
-    ckidAVIMAINHDR, sizeof(MainAVIHeader), 0xdeadbeef, 0xdeadbeef,
+    FOURCC_RIFF, 32*sizeof(DWORD), mmioFOURCC('A','V','I',' '),
+    FOURCC_LIST, 29*sizeof(DWORD), listtypeAVIHEADER, ckidAVIMAINHDR,
+    sizeof(MainAVIHeader), 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
+    0xdeadbeef, 0xdeadbeef, 0xdeadbeef,0xdeadbeef,
+    0xdeadbeef, 0xdeadbeef, 0xdeadbeef,0xdeadbeef,
+    0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
+    FOURCC_LIST, 10*sizeof(DWORD),listtypeSTREAMHEADER, ckidSTREAMHEADER,
+    7*sizeof(DWORD), streamtypeVIDEO, 0xdeadbeef, 0xdeadbeef,
+    0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -83,6 +89,25 @@ static void test_mmioDescend(char *fname)
           (LPCSTR)&ck.ckid, ck.cksize, (LPCSTR)&ck.fccType,
           ck.dwDataOffset, ck.dwFlags);
 
+    /* Skip chunk data */
+    mmioSeek(hmmio, ck.cksize, SEEK_CUR);
+
+    ret = mmioDescend(hmmio, &ckList, &ckList, 0);
+    ok(ret == MMSYSERR_NOERROR, "mmioDescend error %u\n", ret);
+    ok(ckList.ckid == FOURCC_LIST, "wrong ckid: %04x\n", ckList.ckid);
+    ok(ckList.fccType == listtypeSTREAMHEADER, "wrong fccType: %04x\n", ckList.fccType);
+    trace("ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
+          (LPCSTR)&ckList.ckid, ckList.cksize, (LPCSTR)&ckList.fccType,
+          ckList.dwDataOffset, ckList.dwFlags);
+
+    ret = mmioDescend(hmmio, &ck, &ckList, 0);
+    ok(ret == MMSYSERR_NOERROR, "mmioDescend error %u\n", ret);
+    ok(ck.ckid == ckidSTREAMHEADER, "wrong ckid: %04x\n", ck.ckid);
+    ok(ck.fccType == 0, "wrong fccType: %04x\n", ck.fccType);
+    trace("ckid %4.4s cksize %04x fccType %4.4s off %04x flags %04x\n",
+          (LPCSTR)&ck.ckid, ck.cksize, (LPCSTR)&ck.fccType,
+          ck.dwDataOffset, ck.dwFlags);
+
     /* test various mmioDescend flags */
 
     mmioSeek(hmmio, 0, SEEK_SET);




More information about the wine-cvs mailing list