mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
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:
parent
9d351ccb63
commit
95ddda57e2
2 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
])
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue