shithub: sox

Download patch

ref: fef031d187e72f25688ff9f1260a5571afe035b9
parent: b0460afbdbde30abfaeb11e5fc50e3ff862b8839
author: Mans Rullgard <mans@mansr.com>
date: Fri Aug 14 10:04:41 EDT 2020

mp3: remove check for lame id3 tag support

LAME has had ID3 tag support for long enough that it can be assumed
present.

--- a/configure.ac
+++ b/configure.ac
@@ -367,10 +367,6 @@
       AC_CHECK_HEADERS(lame/lame.h,,
         [AC_CHECK_HEADERS(lame.h, [], using_lame=no)])
       AC_CHECK_LIB(mp3lame, lame_get_lametag_frame, MP3_LIBS="$MP3_LIBS -lmp3lame", using_lame=no)
-      AC_CHECK_LIB(mp3lame, id3tag_set_fieldvalue, using_lame=$using_lame)
-      if test "$ac_cv_lib_mp3lame_id3tag_set_fieldvalue" = yes; then
-        AC_DEFINE(HAVE_LAME_ID3TAG, 1, [Define to 1 if lame supports optional ID3 tags.])
-      fi
       if test "$with_lame" = "yes" -a "$using_lame" = "no"; then
         AC_MSG_FAILURE([cannot find LAME])
       fi
@@ -654,9 +650,6 @@
 echo " id3tag....................$using_id3tag"
 echo " lame......................$using_lame"
 if test "x$using_lame" = "xyes"; then
-if test "x$enable_dl_lame" != "xyes"; then
-echo " lame id3tag...............$ac_cv_lib_mp3lame_id3tag_set_fieldvalue"
-fi
 echo " dlopen lame...............$enable_dl_lame"
 fi
 echo " mad.......................$using_mad"
--- a/src/mp3.c
+++ b/src/mp3.c
@@ -127,25 +127,9 @@
 };
 
 #ifdef DL_LAME
-
-  /* Expected to be present in all builds of LAME. */
   #define LAME_FUNC           LSX_DLENTRY_DYNAMIC
-
-  /* id3tag support is an optional component of LAME. Use if available. */
-  #define LAME_FUNC_ID3       LSX_DLENTRY_STUB
-
 #else /* DL_LAME */
-
-  /* Expected to be present in all builds of LAME. */
   #define LAME_FUNC           LSX_DLENTRY_STATIC
-
-  /* id3tag support is an optional component of LAME. Use if available. */
-  #ifdef HAVE_LAME_ID3TAG
-    #define LAME_FUNC_ID3     LSX_DLENTRY_STATIC
-  #else
-    #define LAME_FUNC_ID3     LSX_DLENTRY_STUB
-  #endif
-
 #endif /* DL_LAME */
 
 #define LAME_FUNC_ENTRIES(f,x) \
@@ -169,17 +153,17 @@
   LAME_FUNC(f,x, int, lame_encode_flush, (lame_global_flags *, unsigned char *, int)) \
   LAME_FUNC(f,x, int, lame_close, (lame_global_flags *)) \
   LAME_FUNC(f,x, size_t, lame_get_lametag_frame, (const lame_global_flags *, unsigned char*, size_t)) \
-  LAME_FUNC_ID3(f,x, void, id3tag_init, (lame_global_flags *)) \
-  LAME_FUNC_ID3(f,x, void, id3tag_set_title, (lame_global_flags *, const char* title)) \
-  LAME_FUNC_ID3(f,x, void, id3tag_set_artist, (lame_global_flags *, const char* artist)) \
-  LAME_FUNC_ID3(f,x, void, id3tag_set_album, (lame_global_flags *, const char* album)) \
-  LAME_FUNC_ID3(f,x, void, id3tag_set_year, (lame_global_flags *, const char* year)) \
-  LAME_FUNC_ID3(f,x, void, id3tag_set_comment, (lame_global_flags *, const char* comment)) \
-  LAME_FUNC_ID3(f,x, int, id3tag_set_track, (lame_global_flags *, const char* track)) \
-  LAME_FUNC_ID3(f,x, int, id3tag_set_genre, (lame_global_flags *, const char* genre)) \
-  LAME_FUNC_ID3(f,x, size_t, id3tag_set_pad, (lame_global_flags *, size_t)) \
-  LAME_FUNC_ID3(f,x, size_t, lame_get_id3v2_tag, (lame_global_flags *, unsigned char*, size_t)) \
-  LAME_FUNC_ID3(f,x, int, id3tag_set_fieldvalue, (lame_global_flags *, const char *))
+  LAME_FUNC(f,x, void, id3tag_init, (lame_global_flags *)) \
+  LAME_FUNC(f,x, void, id3tag_set_title, (lame_global_flags *, const char* title)) \
+  LAME_FUNC(f,x, void, id3tag_set_artist, (lame_global_flags *, const char* artist)) \
+  LAME_FUNC(f,x, void, id3tag_set_album, (lame_global_flags *, const char* album)) \
+  LAME_FUNC(f,x, void, id3tag_set_year, (lame_global_flags *, const char* year)) \
+  LAME_FUNC(f,x, void, id3tag_set_comment, (lame_global_flags *, const char* comment)) \
+  LAME_FUNC(f,x, int, id3tag_set_track, (lame_global_flags *, const char* track)) \
+  LAME_FUNC(f,x, int, id3tag_set_genre, (lame_global_flags *, const char* genre)) \
+  LAME_FUNC(f,x, size_t, id3tag_set_pad, (lame_global_flags *, size_t)) \
+  LAME_FUNC(f,x, size_t, lame_get_id3v2_tag, (lame_global_flags *, unsigned char*, size_t)) \
+  LAME_FUNC(f,x, int, id3tag_set_fieldvalue, (lame_global_flags *, const char *))
 
 #ifdef HAVE_TWOLAME
 static const char* const twolame_library_names[] =