Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9a73d867
Commit
9a73d867
authored
Feb 20, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Feb 20, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmioDescend: debugoutput enhanced, FINDLIST/FINDRIFF should Check the
correct ckid (LIST/RIFF) too. (verified against mciavi32.dll)
parent
d6cab504
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
25 deletions
+33
-25
mmio.c
multimedia/mmio.c
+33
-25
No files found.
multimedia/mmio.c
View file @
9a73d867
...
...
@@ -930,18 +930,14 @@ LRESULT WINAPI mmioSendMessage(HMMIO16 hmmio, UINT16 uMessage,
UINT16
WINAPI
mmioDescend
(
HMMIO16
hmmio
,
MMCKINFO
*
lpck
,
const
MMCKINFO
*
lpckParent
,
UINT16
uFlags
)
{
DWORD
dwfcc
,
dwOldPos
;
LPDWORD
tocheck
;
DWORD
dwOldPos
;
MMCKINFO
searchcki
;
char
ckid
[
5
],
fcc
[
5
];
TRACE
(
mmio
,
"(%04X, %p, %p, %04X);
\n
"
,
hmmio
,
lpck
,
lpckParent
,
uFlags
);
TRACE
(
mmio
,
"(%04X, %p, %p, %04X);
\n
"
,
hmmio
,
lpck
,
lpckParent
,
uFlags
);
if
(
lpck
==
NULL
)
return
0
;
dwfcc
=
lpck
->
ckid
;
TRACE
(
mmio
,
"dwfcc=%08lX
\n
"
,
dwfcc
);
dwOldPos
=
mmioSeek32
(
hmmio
,
0
,
SEEK_CUR
);
TRACE
(
mmio
,
"dwOldPos=%ld
\n
"
,
dwOldPos
);
...
...
@@ -954,26 +950,29 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
* examples disagree -Marcus,990216.
*/
searchcki
.
fccType
=
0
;
/* find_chunk looks for 'ckid' */
if
(
uFlags
&
MMIO_FINDCHUNK
)
{
tocheck
=
&
(
lpck
->
ckid
);
dwfcc
=
lpck
->
ckid
;
}
if
(
uFlags
&
MMIO_FINDCHUNK
)
searchcki
.
ckid
=
lpck
->
ckid
;
/* find_riff and find_list look for 'fccType' */
if
(
uFlags
&
(
MMIO_FINDLIST
|
MMIO_FINDRIFF
))
{
dwfcc
=
lpck
->
fccType
;
tocheck
=
&
(
lpck
->
fccType
);
if
(
uFlags
&
MMIO_FINDLIST
)
{
searchcki
.
ckid
=
FOURCC_LIST
;
searchcki
.
fccType
=
lpck
->
fccType
;
}
if
(
uFlags
&
MMIO_FINDRIFF
)
{
searchcki
.
ckid
=
FOURCC_RIFF
;
searchcki
.
fccType
=
lpck
->
fccType
;
}
memcpy
(
&
fcc
,
&
(
searchcki
.
fccType
),
4
);
fcc
[
4
]
=
0
;
memcpy
(
&
ckid
,
&
(
searchcki
.
ckid
),
4
);
ckid
[
4
]
=
0
;
TRACE
(
mmio
,
"searching for %s.%s
\n
"
,
ckid
,
searchcki
.
fccType
?
fcc
:
"<any>"
);
if
(
uFlags
&
(
MMIO_FINDCHUNK
|
MMIO_FINDLIST
|
MMIO_FINDRIFF
))
{
TRACE
(
mmio
,
"MMIO_FINDxxxx dwfcc=%08lX !
\n
"
,
dwfcc
);
while
(
TRUE
)
{
LONG
ix
;
char
fcc
[
5
],
ckid
[
5
];
ix
=
mmioRead32
(
hmmio
,
(
LPSTR
)
lpck
,
3
*
sizeof
(
DWORD
));
TRACE
(
mmio
,
"after _lread32 ix = %ld req = %d, errno = %d
\n
"
,
ix
,
3
*
sizeof
(
DWORD
),
errno
);
if
(
ix
<
sizeof
(
DWORD
))
{
if
(
ix
<
2
*
sizeof
(
DWORD
))
{
mmioSeek32
(
hmmio
,
dwOldPos
,
SEEK_SET
);
WARN
(
mmio
,
"return ChunkNotFound
\n
"
);
return
MMIOERR_CHUNKNOTFOUND
;
...
...
@@ -984,10 +983,17 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
WARN
(
mmio
,
"return ChunkNotFound
\n
"
);
return
MMIOERR_CHUNKNOTFOUND
;
}
memcpy
(
fcc
,
&
dwfcc
,
4
);
fcc
[
4
]
=
'\0'
;
memcpy
(
ckid
,
&
lpck
->
ckid
,
4
);
ckid
[
4
]
=
'\0'
;
TRACE
(
mmio
,
"dwfcc=%s ckid=%s cksize=%08lX !
\n
"
,
fcc
,
ckid
,
lpck
->
cksize
);
if
(
dwfcc
==
*
tocheck
)
memcpy
(
ckid
,
&
lpck
->
ckid
,
4
);
memcpy
(
fcc
,
&
lpck
->
fccType
,
4
);
TRACE
(
mmio
,
"ckid=%s fcc=%s cksize=%08lX !
\n
"
,
ckid
,
searchcki
.
fccType
?
fcc
:
"<unused>"
,
lpck
->
cksize
);
if
((
searchcki
.
ckid
==
lpck
->
ckid
)
&&
(
!
searchcki
.
fccType
||
(
searchcki
.
fccType
==
lpck
->
fccType
)
)
)
break
;
dwOldPos
=
lpck
->
dwDataOffset
+
lpck
->
cksize
;
...
...
@@ -1011,8 +1017,10 @@ UINT16 WINAPI mmioDescend(HMMIO16 hmmio, MMCKINFO * lpck,
lpck
->
dwDataOffset
+=
sizeof
(
DWORD
);
}
mmioSeek32
(
hmmio
,
lpck
->
dwDataOffset
,
SEEK_SET
);
TRACE
(
mmio
,
"lpck->ckid=%08lX lpck->cksize=%ld !
\n
"
,
lpck
->
ckid
,
lpck
->
cksize
);
TRACE
(
mmio
,
"lpck->fccType=%08lX !
\n
"
,
lpck
->
fccType
);
memcpy
(
ckid
,
&
(
lpck
->
ckid
),
4
);
TRACE
(
mmio
,
"lpck->ckid=%s lpck->cksize=%ld !
\n
"
,
ckid
,
lpck
->
cksize
);
memcpy
(
fcc
,
&
(
lpck
->
fccType
),
4
);
TRACE
(
mmio
,
"lpck->fccType=%08lX (%s)!
\n
"
,
lpck
->
fccType
,
searchcki
.
fccType
?
fcc
:
""
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment