summaryrefslogtreecommitdiffstats
path: root/libfaad2/ps_syntax.c
diff options
context:
space:
mode:
authorrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-18 19:39:34 +0000
committerrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-18 19:39:34 +0000
commit82361d50d0dcbb72132fe1203fe152a89dd165e9 (patch)
tree4abb0b4820172c1167ddb75433038be03aa44063 /libfaad2/ps_syntax.c
parentb664e7f3216a22b9e3f92e4861733a3222fa11d8 (diff)
downloadmpv-82361d50d0dcbb72132fe1203fe152a89dd165e9.tar.bz2
mpv-82361d50d0dcbb72132fe1203fe152a89dd165e9.tar.xz
Update to faad2 cvs 20040915+MPlayer fixes
Patch by me and Emanuele Giaquinta git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18142 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libfaad2/ps_syntax.c')
-rw-r--r--libfaad2/ps_syntax.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libfaad2/ps_syntax.c b/libfaad2/ps_syntax.c
index deb15a0861..db8085405d 100644
--- a/libfaad2/ps_syntax.c
+++ b/libfaad2/ps_syntax.c
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: ps_syntax.c,v 1.3 2004/06/30 12:45:56 menno Exp $
+** $Id: ps_syntax.c,v 1.6 2004/09/04 14:56:28 menno Exp $
**/
#include "common.h"
@@ -322,15 +322,21 @@ static void huff_data(bitfile *ld, const uint8_t dt, const uint8_t nr_par,
static INLINE int8_t ps_huff_dec(bitfile *ld, ps_huff_tab t_huff);
-uint16_t ps_data(ps_info *ps, bitfile *ld)
+uint16_t ps_data(ps_info *ps, bitfile *ld, uint8_t *header)
{
uint8_t tmp, n;
uint16_t bits = (uint16_t)faad_get_processed_bits(ld);
+ *header = 0;
+
/* check for new PS header */
if (faad_get1bit(ld
DEBUGVAR(1,1000,"ps_data(): enable_ps_header")))
{
+ *header = 1;
+
+ ps->header_read = 1;
+
ps->use34hybrid_bands = 0;
/* Inter-channel Intensity Difference (IID) parameters enabled */
@@ -372,6 +378,10 @@ uint16_t ps_data(ps_info *ps, bitfile *ld)
DEBUGVAR(1,1005,"ps_data(): enable_ext"));
}
+ /* we are here, but no header has been read yet */
+ if (ps->header_read == 0)
+ return 1;
+
ps->frame_class = (uint8_t)faad_get1bit(ld
DEBUGVAR(1,1006,"ps_data(): frame_class"));
tmp = (uint8_t)faad_getbits(ld, 2