diff --git a/configure.ac b/configure.ac index e3361f1e38..4c8255c840 100644 --- a/configure.ac +++ b/configure.ac @@ -303,6 +303,12 @@ AG_GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [ [LAME_CFLAGS="-DGSTLAME_PRESET"], [LAME_CFLAGS=""] ) + AC_TRY_COMPILE([#include ], [ + void *ptr = &lame_set_VBR_quality + ], + [LAME_CFLAGS="$LAME_CFLAGS -DHAVE_LAME_SET_VBR_QUALITY"], + [LAME_CFLAGS="$LAME_CFLAGS"] + ) AC_SUBST(LAME_CFLAGS) AC_SUBST(LAME_LIBS) ]) diff --git a/ext/lame/gstlamemp3enc.c b/ext/lame/gstlamemp3enc.c index 51e43ae93a..f898539dae 100644 --- a/ext/lame/gstlamemp3enc.c +++ b/ext/lame/gstlamemp3enc.c @@ -67,6 +67,11 @@ #include "gstlamemp3enc.h" #include +/* lame < 3.98 */ +#ifndef HAVE_LAME_SET_VBR_QUALITY +#define lame_set_VBR_quality(flags,q) lame_set_VBR_q((flags),(int)(q)) +#endif + GST_DEBUG_CATEGORY_STATIC (debug); #define GST_CAT_DEFAULT debug