[vlc-devel] [PATCH] Allow for newer a52_init(void) call.

Kelly Anderson kelly at silka.with-linux.com
Sun Jan 8 05:08:21 CET 2012


This fixes compile with svn://svn.videolan.org/liba52/trunk.

---
 configure.ac                                  |   21 +++++++++++++++++++++
 modules/audio_filter/converter/a52tofloat32.c |    6 +++++-
 2 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index fec1f3c..65e20ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2703,6 +2703,27 @@ AC_ARG_WITH(a52-fixed,
       [
         VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
 
+AC_COMPILE_IFELSE([
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <inttypes.h>
+#endif
+#ifdef HAVE_A52DEC_A52_H
+#include <a52dec/a52.h>
+#else
+#include <a52.h>
+#endif
+
+int
+main ()
+{
+  a52_init();
+  return 0;
+}
+], AC_DEFINE(A52_INIT_VOID, 1, [Define if a52_init accepts void.]),)
+
+
 dnl
 dnl DTS Coherent Acoustics decoder plugin
 dnl
diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c
index 2980dd8..dd0322c 100644
--- a/modules/audio_filter/converter/a52tofloat32.c
+++ b/modules/audio_filter/converter/a52tofloat32.c
@@ -205,7 +205,11 @@ static int Open( vlc_object_t *p_this, filter_sys_t *p_sys,
     p_sys->i_flags |= A52_ADJUST_LEVEL;
 
     /* Initialize liba52 */
-    p_sys->p_liba52 = a52_init( 0 );
+#ifdef A52_INIT_VOID
+    p_sys->p_liba52 = a52_init();
+#else
+    p_sys->p_liba52 = a52_init(0);
+#endif
     if( p_sys->p_liba52 == NULL )
     {
         msg_Err( p_this, "unable to initialize liba52" );
-- 
1.7.8.3




More information about the vlc-devel mailing list