summaryrefslogtreecommitdiff
path: root/src/libfaad/ps_syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfaad/ps_syntax.c')
-rw-r--r--src/libfaad/ps_syntax.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/libfaad/ps_syntax.c b/src/libfaad/ps_syntax.c
index fc2f9e7f2..50253d459 100644
--- a/src/libfaad/ps_syntax.c
+++ b/src/libfaad/ps_syntax.c
@@ -1,6 +1,6 @@
/*
-** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR and PS decoding
-** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
+** 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: ps_syntax.c,v 1.1 2005/10/30 00:50:19 tmmm Exp $
+** $Id: ps_syntax.c,v 1.11 2007/11/01 12:33:33 menno Exp $
**/
#include "common.h"
@@ -308,9 +311,9 @@ static const int8_t t_huff_opd[][2] = {
{ 2, 3 }, /* index 1: 2 bits: 0x */
{ 4, 5 }, /* index 2: 3 bits: 00x */
{ /*1*/ -30, /*7*/ -24 }, /* index 3: 3 bits: 01x */
- { /*5*/ -26, 6 }, /* index 4: 4 bits: 000x */
- { /*2*/ -29, /*6*/ -25 }, /* index 5: 4 bits: 001x */
- { /*4*/ -27, /*3*/ -28 } /* index 6: 5 bits: 0001x */
+ { /*5*/ -26, /*2*/ -29 }, /* index 4: 4 bits: 000x */
+ { /*6*/ -25, 6 }, /* index 5: 4 bits: 001x */
+ { /*4*/ -27, /*3*/ -28 } /* index 6: 5 bits: 0011x */
};
/* static function declarations */
@@ -380,7 +383,10 @@ uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header)
/* we are here, but no header has been read yet */
if (ps->header_read == 0)
+ {
+ ps->ps_data_available = 0;
return 1;
+ }
ps->frame_class = (uint8_t)faad_get1bit(ld
DEBUGVAR(1,1006,"ps_data(): frame_class"));
@@ -394,7 +400,7 @@ uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header)
for (n = 1; n < ps->num_env+1; n++)
{
ps->border_position[n] = (uint8_t)faad_getbits(ld, 5
- DEBUGVAR(1,1008,"ps_data(): border_position"));
+ DEBUGVAR(1,1008,"ps_data(): border_position")) + 1;
}
}