diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-08-13 14:28:30 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-08-13 14:28:30 +0100 |
commit | e8cc3903fc5be11c0e326fc23650599dbb1d07a0 (patch) | |
tree | 45c2bff1062583269fc745a54dcc1df048cbd62a /src/libfaad/mp4.c | |
parent | 3a6da3fcaef64afe71e1e1a0d41baca0872e98f8 (diff) | |
download | xine-lib-e8cc3903fc5be11c0e326fc23650599dbb1d07a0.tar.gz xine-lib-e8cc3903fc5be11c0e326fc23650599dbb1d07a0.tar.bz2 |
Update to libfaad 2.6.1, fixing a crash with a corrupted AAC file.
Source is the version in the 1.2 branch.
Diffstat (limited to 'src/libfaad/mp4.c')
-rw-r--r-- | src/libfaad/mp4.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/libfaad/mp4.c b/src/libfaad/mp4.c index 651280805..ef3f8a9c9 100644 --- a/src/libfaad/mp4.c +++ b/src/libfaad/mp4.c @@ -1,6 +1,6 @@ /* ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding -** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com +** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -19,10 +19,13 @@ ** Any non-GPL usage of this software or parts of this software is strictly ** forbidden. ** +** The "appropriate copyright message" mentioned in section 2c of the GPLv2 +** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com" +** ** Commercial non-GPL licensing of this software is possible. -** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. +** For more info contact Nero AG through Mpeg4AAClicense@nero.com. ** -** $Id: mp4.c,v 1.9 2005/10/29 23:57:07 tmmm Exp $ +** $Id: mp4.c,v 1.38 2007/11/01 12:33:32 menno Exp $ **/ #include "common.h" @@ -58,11 +61,7 @@ static uint8_t ObjectTypesTable[32] = { #else 0, /* 5 SBR */ #endif -#ifdef SCALABLE_DEC - 1, /* 6 AAC Scalable */ -#else 0, /* 6 AAC Scalable */ -#endif 0, /* 7 TwinVQ */ 0, /* 8 CELP */ 0, /* 9 HVXC */ @@ -83,11 +82,7 @@ static uint8_t ObjectTypesTable[32] = { #else 0, /* 19 ER AAC LTP */ #endif -#ifdef SCALABLE_DEC - 1, /* 20 ER AAC scalable */ -#else 0, /* 20 ER AAC scalable */ -#endif 0, /* 21 ER TwinVQ */ 0, /* 22 ER BSAC */ #ifdef LD_DEC @@ -248,10 +243,10 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer, if (syncExtensionType == 0x2b7) { - mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5 + uint8_t tmp_OTi = (uint8_t)faad_getbits(&ld, 5 DEBUGVAR(1,10,"parse_audio_decoder_specific_info(): extensionAudioObjectType")); - if (mp4ASC->objectTypeIndex == 5) + if (tmp_OTi == 5) { mp4ASC->sbr_present_flag = (uint8_t)faad_get1bit(&ld DEBUGVAR(1,11,"parse_audio_decoder_specific_info(): sbr_present_flag")); @@ -259,6 +254,10 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer, if (mp4ASC->sbr_present_flag) { uint8_t tmp; + + /* Don't set OT to SBR until checked that it is actually there */ + mp4ASC->objectTypeIndex = tmp_OTi; + tmp = (uint8_t)faad_getbits(&ld, 4 DEBUGVAR(1,12,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex")); |