shithub: aacdec

Download patch

ref: 6dfe72f142947c22f7f9f7c8e4894c3f35657656
parent: b823b1ec32373b28794aa01cca69ea9c472ec20a
author: menno <menno>
date: Wed Feb 4 15:07:24 EST 2004

small fixes for DRM

--- a/libfaad/bits.h
+++ b/libfaad/bits.h
@@ -22,7 +22,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
-** $Id: bits.h,v 1.35 2004/01/28 19:17:25 menno Exp $
+** $Id: bits.h,v 1.36 2004/02/04 20:07:24 menno Exp $
 **/
 
 #ifndef __BITS_H__
@@ -271,7 +271,7 @@
 
     faad_rewindbits(ld);
 
-    CRC = ~faad_getbits(ld, 8
+    CRC = (uint8_t) ~faad_getbits(ld, 8
         DEBUGVAR(1,999,"faad_check_CRC(): CRC"));          /* CRC is stored inverted */
 
     for (; len>0; len--)
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.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: decoder.c,v 1.93 2004/01/28 19:17:25 menno Exp $
+** $Id: decoder.c,v 1.94 2004/02/04 20:07:24 menno Exp $
 **/
 
 #include "common.h"
@@ -414,6 +414,7 @@
     /* Take care of buffers */
     if (hDecoder->sample_buffer) faad_free(hDecoder->sample_buffer);
     hDecoder->sample_buffer = NULL;
+    hDecoder->alloced_channels = 0;
 
     for (i = 0; i < MAX_CHANNELS; i++)
     {
@@ -440,13 +441,17 @@
 #endif
     }
 
-#ifdef SBR_DEC
     for (i = 0; i < MAX_SYNTAX_ELEMENTS; i++)
     {
+#ifdef SBR_DEC
         if (hDecoder->sbr[i])
             sbrDecodeEnd(hDecoder->sbr[i]);
-    }
+
+        hDecoder->sbr_alloced[i] = 0;
 #endif
+        hDecoder->element_alloced[i] = 0;
+        hDecoder->element_output_channels[i] = 0;
+    }
 
     hDecoder->fb = filter_bank_init(hDecoder->frameLength);
 
--- a/libfaad/sbr_dec.h
+++ b/libfaad/sbr_dec.h
@@ -22,7 +22,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
-** $Id: sbr_dec.h,v 1.22 2004/01/29 11:31:11 menno Exp $
+** $Id: sbr_dec.h,v 1.23 2004/02/04 20:07:24 menno Exp $
 **/
 
 #ifndef __SBR_DEC_H__
@@ -158,7 +158,9 @@
 	int8_t lcstereo_flag;
 	uint8_t bs_dataextra;
     uint8_t Is_DRM_SBR;
+#ifdef DRM_PS
     drm_ps_info drm_ps;
+#endif
 #endif
 
 	uint8_t numTimeSlotsRate;