Maarten Lankhorst : quartz: Fix support for mpeg layer 1 and 2.
Alexandre Julliard
julliard at winehq.org
Tue Sep 27 13:00:05 CDT 2011
Module: wine
Branch: master
Commit: 12e132e9be304dbdcfea153af03c66c19cf9f7aa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=12e132e9be304dbdcfea153af03c66c19cf9f7aa
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Mon Sep 26 17:34:44 2011 +0200
quartz: Fix support for mpeg layer 1 and 2.
---
dlls/quartz/mpegsplit.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c
index 6043f69..059a854 100644
--- a/dlls/quartz/mpegsplit.c
+++ b/dlls/quartz/mpegsplit.c
@@ -128,12 +128,14 @@ static HRESULT parse_header(BYTE *header, LONGLONG *plen, LONGLONG *pduration)
LONGLONG duration;
int bitrate_index, freq_index, lsf = 1, mpeg1, layer, padding, bitrate, length;
+ if (header[0] != 0xff)
+ return E_INVALIDARG;
- if (!(header[0] == 0xff && ((header[1]>>5)&0x7) == 0x7 &&
+ if (!(((header[1]>>5)&0x7) == 0x7 &&
((header[1]>>1)&0x3) != 0 && ((header[2]>>4)&0xf) != 0xf &&
((header[2]>>2)&0x3) != 0x3))
{
- FIXME("Not a valid header: %02x:%02x\n", header[0], header[1]);
+ FIXME("Not a valid header: %02x:%02x\n", header[1], header[2]);
return E_INVALIDARG;
}
@@ -147,7 +149,7 @@ static HRESULT parse_header(BYTE *header, LONGLONG *plen, LONGLONG *pduration)
padding = ((header[2]>>1)&0x1);
bitrate = tabsel_123[lsf][layer-1][bitrate_index] * 1000;
- if (!bitrate || layer != 3)
+ if (!bitrate)
{
FIXME("Not a valid header: %02x:%02x:%02x:%02x\n", header[0], header[1], header[2], header[3]);
return E_INVALIDARG;
@@ -353,6 +355,7 @@ static HRESULT MPEGSplitter_query_accept(LPVOID iface, const AM_MEDIA_TYPE *pmt)
FIXME("MPEG-1 system streams not yet supported.\n");
else if (IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_MPEG1VideoCD))
FIXME("MPEG-1 VideoCD streams not yet supported.\n");
+ else FIXME("%s\n", debugstr_guid(&pmt->subtype));
return S_FALSE;
}
More information about the wine-cvs
mailing list