aac: Fix compilation without libmp4v2.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Apr 2015 13:59:26 +0000 (15:59 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Apr 2015 14:02:20 +0000 (16:02 +0200)
This was broken for two reasons: First, the aac audio format handler
depends on libmp4v2 rather than libfaad. Second, we must include
aac_common if either libfaad or libmp4v2 (or both) were found. The
logic in configure.ac got this wrong.

afh_common.c
configure.ac

index 7947a66..31e4f4e 100644 (file)
@@ -48,7 +48,7 @@ static struct audio_format_handler afl[] = {
        },
        {
                .name = "aac",
-#ifdef HAVE_FAAD
+#if defined(HAVE_MP4V2)
                .init = aac_afh_init,
 #endif
        },
index 8b5fb95..bd1b5f5 100644 (file)
@@ -949,8 +949,14 @@ NEED_OPUS_OBJECTS &&
 NEED_FLAC_OBJECTS && {
        play_errlist_objs="$play_errlist_objs flacdec_filter flac_afh"
 }
-if test $HAVE_FAAD = yes && test $HAVE_MP4V2 = yes; then
-       play_errlist_objs="$play_errlist_objs aacdec_filter aac_afh aac_common"
+if test $HAVE_FAAD = yes; then
+       play_errlist_objs="$play_errlist_objs aacdec_filter"
+fi
+if test $HAVE_MP4V2 = yes; then
+       play_errlist_objs="$play_errlist_objs aac_afh"
+fi
+if test $HAVE_MP4V2 = yes || test $HAVE_FAAD = yes; then
+       play_errlist_objs="$play_errlist_objs aac_common"
 fi
 if test $HAVE_MAD = yes; then
        play_cmdline_objs="$play_cmdline_objs mp3dec_filter"