lame: fix compilation with LAME versions < 3.98

lame_set_VBR_quality(), which takes a floating point value for the
quality, has been added only in v3.98. Use lame_set_VBR_q(), which
takes quality as an integer, for older LAME versions.

Fixes #581341.
This commit is contained in:
Tim-Philipp Müller 2009-05-05 16:38:19 +01:00
parent 9d351ccb63
commit 95ddda57e2
2 changed files with 11 additions and 0 deletions

View file

@ -303,6 +303,12 @@ AG_GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
[LAME_CFLAGS="-DGSTLAME_PRESET"],
[LAME_CFLAGS=""]
)
AC_TRY_COMPILE([#include <lame/lame.h>], [
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)
])

View file

@ -67,6 +67,11 @@
#include "gstlamemp3enc.h"
#include <gst/gst-i18n-plugin.h>
/* 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