Quartz: Avisplit.c Fix
Robert Shearman
rob at codeweavers.com
Thu Jul 22 17:36:22 CDT 2004
Hi,
dlls/quartz/avisplit.c gives the warning on newer compilers:
avisplit.c: In function `AVISplitter_Sample':
avisplit.c:552: warning: case label value 1263424842 exceeds maximum value
This patch fixes the warning and the broken code.
Rob
Changelog:
ckidJUNK is a FOURCC not a TWOCC so rewrite the case statement
appropriately.
-------------- next part --------------
Index: wine/dlls/quartz/avisplit.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/avisplit.c,v
retrieving revision 1.1
diff -u -r1.1 avisplit.c
--- wine/dlls/quartz/avisplit.c 18 Nov 2003 20:47:48 -0000 1.1
+++ wine/dlls/quartz/avisplit.c 22 Jul 2004 22:10:21 -0000
@@ -549,30 +549,34 @@
else
offset_src = 0;
- switch (TWOCCFromFOURCC(This->CurrentChunk.fcc))
+ switch (This->CurrentChunk.fcc)
{
- case cktypeDIBcompressed:
- bSyncPoint = FALSE;
- /* fall-through */
- case cktypeDIBbits:
- /* FIXME: check that pin is of type video */
- break;
- case cktypeWAVEbytes:
- /* FIXME: check that pin is of type audio */
- break;
- case cktypePALchange:
- FIXME("handle palette change\n");
- break;
case ckidJUNK:
/* silently ignore */
if (S_FALSE == AVISplitter_NextChunk(&This->CurrentChunkOffset, &This->CurrentChunk, &tStart, &tStop, pbSrcStream))
bMoreData = FALSE;
continue;
default:
- FIXME("Skipping unknown chunk type: %s at file offset 0x%lx\n", debugstr_an((LPSTR)&This->CurrentChunk.fcc, 4), (DWORD)BYTES_FROM_MEDIATIME(This->CurrentChunkOffset));
- if (S_FALSE == AVISplitter_NextChunk(&This->CurrentChunkOffset, &This->CurrentChunk, &tStart, &tStop, pbSrcStream))
- bMoreData = FALSE;
- continue;
+ switch (TWOCCFromFOURCC(This->CurrentChunk.fcc))
+ {
+ case cktypeDIBcompressed:
+ bSyncPoint = FALSE;
+ /* fall-through */
+ case cktypeDIBbits:
+ /* FIXME: check that pin is of type video */
+ break;
+ case cktypeWAVEbytes:
+ /* FIXME: check that pin is of type audio */
+ break;
+ case cktypePALchange:
+ FIXME("handle palette change\n");
+ break;
+ default:
+ FIXME("Skipping unknown chunk type: %s at file offset 0x%lx\n", debugstr_an((LPSTR)&This->CurrentChunk.fcc, 4), (DWORD)BYTES_FROM_MEDIATIME(This->CurrentChunkOffset));
+ if (S_FALSE == AVISplitter_NextChunk(&This->CurrentChunkOffset, &This->CurrentChunk, &tStart, &tStop, pbSrcStream))
+ bMoreData = FALSE;
+ continue;
+ }
}
streamId = StreamFromFOURCC(This->CurrentChunk.fcc);
More information about the wine-patches
mailing list