diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | ext/faad/gstfaad.c | 10 |
3 files changed, 25 insertions, 1 deletions
@@ -1,6 +1,16 @@ 2007-02-11 Stefan Kost <ensonic@users.sf.net> * configure.ac: + Tell the code which faad it is, so that we can adjust the hacks + needed. + + * ext/faad/gstfaad.c: + Make our hacks dependent on the fadd lib in use. + + +2007-02-11 Stefan Kost <ensonic@users.sf.net> + + * configure.ac: Fix faad detection to support also fadd with new symbol prefix. ChangeLog surgery. diff --git a/configure.ac b/configure.ac index 316473ca..64c16278 100644 --- a/configure.ac +++ b/configure.ac @@ -541,7 +541,10 @@ GST_CHECK_FEATURE(FAAD, [AAC decoder plug-in], faad, [ FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no") if test $HAVE_FAAD = "no"; then GST_CHECK_LIBHEADER(FAAD, faad, NeAACDecOpen, -lm, neaacdec.h, - FAAD_LIBS="-lfaad -lm", HAVE_FAAD="no") + [ FAAD_LIBS="-lfaad -lm" + AC_DEFINE(FAAD_IS_NEAAC, 1, [Define if AAC is using new api prefix]) + ], + HAVE_FAAD="no",) fi if test $HAVE_FAAD = "yes"; then AC_MSG_CHECKING([Checking for FAAD >= 2]) @@ -573,6 +576,7 @@ return 0; fi AS_SCRUB_INCLUDE(FAAD_CFLAGS) AC_SUBST(FAAD_LIBS) + AC_SUBST(FAAD_IS_NEAAC) ]) dnl *** gsm *** diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c index 72530138..47be4559 100644 --- a/ext/faad/gstfaad.c +++ b/ext/faad/gstfaad.c @@ -38,11 +38,21 @@ * but not all, hence this Truly Evil Hack. This hack will need updating if * upstream ever releases something with the new API. */ +#ifdef FAAD_IS_NEAAC +#define NeAACDecInit NeAACDecInit_no_definition +#define NeAACDecInit2 NeAACDecInit2_no_definition +#else #define faacDecInit faacDecInit_no_definition #define faacDecInit2 faacDecInit2_no_definition +#endif #include "gstfaad.h" +#ifdef FAAD_IS_NEAAC +#undef NeAACDecInit +#undef NeAACDecInit2 +#else #undef faacDecInit #undef faacDecInit2 +#endif extern long faacDecInit (faacDecHandle, guint8 *, guint32, guint32 *, guint8 *); extern int8_t faacDecInit2 (faacDecHandle, guint8 *, guint32, |