summaryrefslogtreecommitdiff
path: root/src/libfaad/cfft.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-08-13 14:28:30 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-08-13 14:28:30 +0100
commite8cc3903fc5be11c0e326fc23650599dbb1d07a0 (patch)
tree45c2bff1062583269fc745a54dcc1df048cbd62a /src/libfaad/cfft.c
parent3a6da3fcaef64afe71e1e1a0d41baca0872e98f8 (diff)
downloadxine-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/cfft.c')
-rw-r--r--src/libfaad/cfft.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/libfaad/cfft.c b/src/libfaad/cfft.c
index 61cac2fd5..5b01d75d3 100644
--- a/src/libfaad/cfft.c
+++ b/src/libfaad/cfft.c
@@ -1,28 +1,31 @@
/*
** 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
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
-**
+**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
-**
+**
** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
+** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** 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: cfft.c,v 1.12 2006/09/26 18:00:31 dgp85 Exp $
+** $Id: cfft.c,v 1.35 2007/11/01 12:33:29 menno Exp $
**/
/*
@@ -546,7 +549,7 @@ static void passf5(const uint16_t ido, const uint16_t l1, const complex_t *cc,
ComplexMult(&RE(c4), &RE(c5),
ti12, ti11, RE(t5), RE(t4));
ComplexMult(&IM(c4), &IM(c5),
- ti12, ti12, IM(t5), IM(t4));
+ ti12, ti11, IM(t5), IM(t4));
RE(ch[ah+l1]) = RE(c2) + IM(c5);
IM(ch[ah+l1]) = IM(c2) - RE(c5);
@@ -648,7 +651,7 @@ static void passf5(const uint16_t ido, const uint16_t l1, const complex_t *cc,
ComplexMult(&RE(c4), &RE(c5),
ti12, ti11, RE(t5), RE(t4));
ComplexMult(&IM(c4), &IM(c5),
- ti12, ti12, IM(t5), IM(t4));
+ ti12, ti11, IM(t5), IM(t4));
IM(d2) = IM(c2) - RE(c5);
IM(d3) = IM(c3) - RE(c4);
@@ -992,13 +995,11 @@ cfft_info *cffti(uint16_t n)
void cfftu(cfft_info *cfft)
{
- if ( ! cfft ) return;
-
- faad_free(cfft->work);
+ if (cfft->work) faad_free(cfft->work);
#ifndef FIXED_POINT
- faad_free(cfft->tab);
+ if (cfft->tab) faad_free(cfft->tab);
#endif
- faad_free(cfft);
+ if (cfft) faad_free(cfft);
}