summaryrefslogtreecommitdiffstats
path: root/libfaad2/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/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/syntax.c')
-rw-r--r--libfaad2/syntax.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libfaad2/syntax.c b/libfaad2/syntax.c
index cceb5af43a..f3d3c976f3 100644
--- a/libfaad2/syntax.c
+++ b/libfaad2/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: syntax.c,v 1.80 2004/06/30 12:45:57 menno Exp $
+** $Id: syntax.c,v 1.82 2004/09/04 14:56:29 menno Exp $
**/
/*
@@ -1042,6 +1042,9 @@ static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
if (hDecoder->sbr[sbr_ele]->ps_used)
{
hDecoder->ps_used[sbr_ele] = 1;
+
+ /* set element independent flag to 1 as well */
+ hDecoder->ps_used_global = 1;
}
#endif
} else {
@@ -1254,13 +1257,20 @@ void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo
if (hDecoder->sbr[0]->ps_used)
{
hDecoder->ps_used[0] = 1;
+ hDecoder->ps_used_global = 1;
}
#endif
/* check CRC */
/* no need to check it if there was already an error */
-// if (hDecoder->sbr[0]->ret == 0)
-// hDecoder->sbr[0]->ret = (uint8_t)faad_check_CRC(&ld_sbr, (uint16_t)faad_get_processed_bits(&ld_sbr) - 8);
+ if (hDecoder->sbr[0]->ret == 0)
+ hDecoder->sbr[0]->ret = (uint8_t)faad_check_CRC(&ld_sbr, (uint16_t)faad_get_processed_bits(&ld_sbr) - 8);
+
+ /* SBR data was corrupted, disable it until the next header */
+ if (hDecoder->sbr[0]->ret != 0)
+ {
+ hDecoder->sbr[0]->header_count = 0;
+ }
faad_endbits(&ld_sbr);