shithub: aacdec

Download patch

ref: 0878897bd04eaf93099d56ddc663f9f6440550c2
parent: 583b72bd587731822ed92ff2784cc365244842ec
author: menno <menno>
date: Wed Feb 4 19:51:03 EST 2009

Final fixes to version numbers and use of external header

--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@
 
 AC_INIT
 AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(faad2, 2.6.0cvs)
+AM_INIT_AUTOMAKE(faad2, 2.7.0)
 
 AC_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
--- a/libfaad/Makefile.am
+++ b/libfaad/Makefile.am
@@ -4,7 +4,7 @@
 include_HEADERS = $(top_srcdir)/include/faad.h \
 		  $(top_srcdir)/include/neaacdec.h
 
-libfaad_la_LDFLAGS = -version-info 1:0:0
+libfaad_la_LDFLAGS = -version-info 2:0:0
 libfaad_la_LIBADD = -lm
 
 libfaad_la_SOURCES = bits.c cfft.c decoder.c drc.c \
--- a/libfaad/common.h
+++ b/libfaad/common.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: common.h,v 1.76 2009/01/26 23:51:15 menno Exp $
+** $Id: common.h,v 1.77 2009/02/05 00:51:03 menno Exp $
 **/
 
 #ifndef __COMMON_H__
@@ -39,7 +39,7 @@
 #  include "../config.h"
 #endif
 
-#include <neaacdec.h>
+#include "neaacdec.h"
 
 #if 1
 #define INLINE __inline
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: decoder.c,v 1.116 2009/01/26 23:51:15 menno Exp $
+** $Id: decoder.c,v 1.117 2009/02/05 00:51:03 menno Exp $
 **/
 
 #include "common.h"
@@ -159,8 +159,9 @@
     return hDecoder;
 }
 
-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecStruct *hDecoder)
+NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hpDecoder)
 {
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
     if (hDecoder)
     {
         NeAACDecConfigurationPtr config = &(hDecoder->config);
@@ -171,9 +172,10 @@
     return NULL;
 }
 
-unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecStruct *hDecoder,
+unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hpDecoder,
                                                    NeAACDecConfigurationPtr config)
 {
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
     if (hDecoder && config)
     {
         /* check if we can decode this object type */
@@ -233,7 +235,7 @@
 }
 
 
-long NEAACDECAPI NeAACDecInit(NeAACDecStruct *hDecoder,
+long NEAACDECAPI NeAACDecInit(NeAACDecHandle hpDecoder,
                               unsigned char *buffer,
                               unsigned long buffer_size,
                               unsigned long *samplerate,
@@ -243,6 +245,7 @@
     bitfile ld;
     adif_header adif;
     adts_header adts;
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
 
 
     if ((hDecoder == NULL) || (samplerate == NULL) || (channels == NULL))
@@ -363,12 +366,13 @@
 }
 
 /* Init the library using a DecoderSpecificInfo */
-char NEAACDECAPI NeAACDecInit2(NeAACDecStruct *hDecoder,
+char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hpDecoder,
                                unsigned char *pBuffer,
                                unsigned long SizeOfDecoderSpecificInfo,
                                unsigned long *samplerate,
                                unsigned char *channels)
 {
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
     int8_t rc;
     mp4AudioSpecificConfig mp4ASC;
 
@@ -456,10 +460,11 @@
 }
 
 #ifdef DRM
-char NEAACDECAPI NeAACDecInitDRM(NeAACDecStruct **hDecoder,
+char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hpDecoder,
                                  unsigned long samplerate,
                                  unsigned char channels)
 {
+    NeAACDecStruct** hDecoder = (NeAACDecStruct**)hpDecoder;
     if (hDecoder == NULL)
         return 1; /* error */
 
@@ -498,9 +503,10 @@
 }
 #endif
 
-void NEAACDECAPI NeAACDecClose(NeAACDecStruct *hDecoder)
+void NEAACDECAPI NeAACDecClose(NeAACDecHandle hpDecoder)
 {
     uint8_t i;
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
 
     if (hDecoder == NULL)
         return;
@@ -551,8 +557,9 @@
     if (hDecoder) faad_free(hDecoder);
 }
 
-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecStruct *hDecoder, long frame)
+void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hpDecoder, long frame)
 {
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
     if (hDecoder)
     {
         hDecoder->postSeekResetFlag = 1;
@@ -780,15 +787,16 @@
     }
 }
 
-void* NEAACDECAPI NeAACDecDecode(NeAACDecStruct *hDecoder,
+void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hpDecoder,
                                  NeAACDecFrameInfo *hInfo,
                                  unsigned char *buffer,
                                  unsigned long buffer_size)
 {
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
     return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0);
 }
 
-void* NEAACDECAPI NeAACDecDecode2(NeAACDecStruct *hDecoder,
+void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hpDecoder,
                                   NeAACDecFrameInfo *hInfo,
                                   unsigned char *buffer,
                                   unsigned long buffer_size,
@@ -795,6 +803,7 @@
                                   void **sample_buffer,
                                   unsigned long sample_buffer_size)
 {
+    NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
     if ((sample_buffer == NULL) || (sample_buffer_size == 0))
     {
         hInfo->error = 27;
--- a/libfaad/mp4.h
+++ b/libfaad/mp4.h
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: mp4.h,v 1.27 2009/01/26 23:51:15 menno Exp $
+** $Id: mp4.h,v 1.28 2009/02/05 00:51:03 menno Exp $
 **/
 
 #ifndef __MP4_H__
@@ -35,7 +35,7 @@
 extern "C" {
 #endif
 
-#include <neaacdec.h>
+#include "neaacdec.h"
 
 int8_t AudioSpecificConfig2(uint8_t *pBuffer,
                             uint32_t buffer_size,