Bruno Jesus : quartz: Avoid audio header test code duplication.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Sep 14 09:44:34 CDT 2015
Module: wine
Branch: master
Commit: 66694cc043a86c4d2a3d96f390b22b4d18e60d39
URL: http://source.winehq.org/git/wine.git/?a=commit;h=66694cc043a86c4d2a3d96f390b22b4d18e60d39
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Sat Sep 12 17:16:44 2015 +0800
quartz: Avoid audio header test code duplication.
The function MPEGSplitter_head_check does exactly the same test.
---
dlls/quartz/mpegsplit.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c
index 1ed352b..273c77c 100644
--- a/dlls/quartz/mpegsplit.c
+++ b/dlls/quartz/mpegsplit.c
@@ -114,9 +114,7 @@ static HRESULT parse_header(BYTE *header, LONGLONG *plen, LONGLONG *pduration)
int bitrate_index, freq_index, lsf = 1, mpeg1, layer, padding, bitrate, length;
LONGLONG duration;
- if (!(header[0] == 0xff && ((header[1]>>5)&0x7) == 0x7 &&
- ((header[1]>>1)&0x3) != 0 && ((header[2]>>4)&0xf) != 0xf &&
- ((header[2]>>2)&0x3) != 0x3))
+ if (MPEGSplitter_head_check(header) != MPEG_AUDIO_HEADER)
{
FIXME("Not a valid header: %02x:%02x:%02x:%02x\n", header[0], header[1], header[2], header[3]);
return E_INVALIDARG;
More information about the wine-cvs
mailing list