ALAC/alac_encoder.c : Add correct byte swapping for mChannelLayoutTag.

Patch from Michael Pruett, author of libaudiofile.
This commit is contained in:
Erik de Castro Lopo 2013-03-07 07:59:00 +11:00
parent ebda7e54ac
commit e11a0c1881
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-03-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/ALAC/alac_encoder.c
Patch from Michael Pruett (author of libaudiofile) to add correct byte
swapping for the mChannelLayoutTag field.
2013-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* doc/bugs.html

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2011 Apple Inc. All rights reserved.
* Copyright (C) 2012 Erik de Castro Lopo <erikd@mega-nerd.com>
* Copyright (C) 2012-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
*
* @APPLE_APACHE_LICENSE_HEADER_START@
*
@ -1151,7 +1151,7 @@ alac_get_magic_cookie(ALAC_ENCODER *p, void * outCookie, uint32_t * ioSize )
GetConfig(p, &theConfig);
if (theConfig.numChannels > 2)
{
theChannelLayout.mChannelLayoutTag = ALACChannelLayoutTags[theConfig.numChannels - 1];
theChannelLayout.mChannelLayoutTag = Swap32NtoB(ALACChannelLayoutTags[theConfig.numChannels - 1]);
theCookieSize += (sizeof(ALACAudioChannelLayout) + kChannelAtomSize);
}
if (*ioSize >= theCookieSize)