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/common.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/common.c')
-rw-r--r-- | src/libfaad/common.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/libfaad/common.c b/src/libfaad/common.c index 8c0d93e95..595605586 100644 --- a/src/libfaad/common.c +++ b/src/libfaad/common.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: common.c,v 1.8 2005/10/29 23:57:06 tmmm Exp $ +** $Id: common.c,v 1.26 2007/11/01 12:33:30 menno Exp $ **/ /* just some common functions that could be used anywhere */ @@ -229,16 +232,16 @@ static uint32_t __r2 = 1; * which gives a period of 18.410.713.077.675.721.215. The result is the * XORed values of both generators. */ -uint32_t random_int(void) +uint32_t ne_rng(uint32_t *__r1, uint32_t *__r2) { uint32_t t1, t2, t3, t4; - t3 = t1 = __r1; t4 = t2 = __r2; // Parity calculation is done via table lookup, this is also available + t3 = t1 = *__r1; t4 = t2 = *__r2; // Parity calculation is done via table lookup, this is also available t1 &= 0xF5; t2 >>= 25; // on CPUs without parity, can be implemented in C and avoid unpredictable t1 = Parity [t1]; t2 &= 0x63; // jumps and slow rotate through the carry flag operations. t1 <<= 31; t2 = Parity [t2]; - return (__r1 = (t3 >> 1) | t1 ) ^ (__r2 = (t4 + t4) | t2 ); + return (*__r1 = (t3 >> 1) | t1 ) ^ (*__r2 = (t4 + t4) | t2 ); } uint32_t ones32(uint32_t x) |