public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/lame] f45: Update to 4.0
@ 2026-08-21 4:03 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-08-21 4:03 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/lame
Branch : f45
Commit : 7728fce40b1d5a766ec6caa68986884977d1ef54
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-08-20T15:12:52-04:00
Stats : +206/-12 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/lame/c/7728fce40b1d5a766ec6caa68986884977d1ef54?branch=f45
Log:
Update to 4.0
- Resolves: rhbz#2449921
- Resolves: rhbz#2498493
---
diff --git a/.gitignore b/.gitignore
index 3946b4d..84adaa5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/lame-3.99.5.tar.gz
/lame-3.100.tar.gz
+/lame-4.0.tar.gz
diff --git a/frontend-utf8.patch b/frontend-utf8.patch
new file mode 100644
index 0000000..4de7f6d
--- /dev/null
+++ b/frontend-utf8.patch
@@ -0,0 +1,173 @@
+------------------------------------------------------------------------
+r6562 | aleidinger | 2026-07-12 04:05:47 -0400 (Sun, 12 Jul 2026) | 15 lines
+
+frontend, libmp3lame: fix ID3v2 UTF-8 tag path (SF #524)
+
+The ID3v2 tag writer routed both the UTF-8 and UTF-16 command-line
+encodings through a single path typed for UTF-16. For --id3v2-utf8 that
+mismatches the actual byte-oriented data and reaches tag setters current
+toolchains reject, so LAME fails to build with GCC 16 - and misencodes
+UTF-8 tags where it does build.
+
+Give each encoding its own path so the data and the setters it feeds
+always agree. The UTF-8 field-value case needs a UTF-8 setter the library
+did not expose, so add one beside the existing field-value setters.
+
+Covered by new unit tests for the id3tag API and the frontend tag
+dispatch across all three text encodings.
+
+
+diff --git a/frontend/parse.c b/frontend/parse.c
+index 71175448..94c7e958 100644
+--- a/frontend/parse.c
++++ b/frontend/parse.c
+@@ -402,40 +402,44 @@ static int getIntValue(char const* token, char const* arg, int* ptr)
+ }
+
+ #ifdef ID3TAGS_EXTENDED
++/* Set an ID3v2 tag field from UTF-16 data. The data pointer is genuinely
++ UTF-16 here, so the UTF-16 id3tag_* setters are used throughout. */
+ static int
+-set_id3v2tag(lame_global_flags* gfp, TextEncoding enc, int type, unsigned short const* str)
++set_id3v2tag_utf16(lame_global_flags* gfp, int type, unsigned short const* str)
+ {
+- switch (enc)
++ switch (type)
+ {
+- case TENC_UTF8:
+- switch (type)
+- {
+- case 'a': return id3tag_set_textinfo_utf8(gfp, "TPE1", str);
+- case 't': return id3tag_set_textinfo_utf8(gfp, "TIT2", str);
+- case 'l': return id3tag_set_textinfo_utf8(gfp, "TALB", str);
+- case 'g': return id3tag_set_textinfo_utf8(gfp, "TCON", str);
+- case 'c': return id3tag_set_comment_ucs2(gfp, 0, 0, str);
+- case 'n': return id3tag_set_textinfo_utf8(gfp, "TRCK", str);
+- case 'y': return id3tag_set_textinfo_utf8(gfp, "TYER", str);
+- case 'v': return id3tag_set_fieldvalue_ucs2(gfp, str);
+- }
+- ;;
+- case TENC_UTF16:
+- switch (type)
+- {
+- case 'a': return id3tag_set_textinfo_utf16(gfp, "TPE1", str);
+- case 't': return id3tag_set_textinfo_utf16(gfp, "TIT2", str);
+- case 'l': return id3tag_set_textinfo_utf16(gfp, "TALB", str);
+- case 'g': return id3tag_set_textinfo_utf16(gfp, "TCON", str);
+- case 'c': return id3tag_set_comment_utf16(gfp, 0, 0, str);
+- case 'n': return id3tag_set_textinfo_utf16(gfp, "TRCK", str);
+- case 'y': return id3tag_set_textinfo_utf16(gfp, "TYER", str);
+- case 'v': return id3tag_set_fieldvalue_utf16(gfp, str);
+- }
+- ;;
+- default:
+- return -3;
+- }
++ case 'a': return id3tag_set_textinfo_utf16(gfp, "TPE1", str);
++ case 't': return id3tag_set_textinfo_utf16(gfp, "TIT2", str);
++ case 'l': return id3tag_set_textinfo_utf16(gfp, "TALB", str);
++ case 'g': return id3tag_set_textinfo_utf16(gfp, "TCON", str);
++ case 'c': return id3tag_set_comment_utf16(gfp, 0, 0, str);
++ case 'n': return id3tag_set_textinfo_utf16(gfp, "TRCK", str);
++ case 'y': return id3tag_set_textinfo_utf16(gfp, "TYER", str);
++ case 'v': return id3tag_set_fieldvalue_utf16(gfp, str);
++ }
++ return -3;
++}
++
++/* Set an ID3v2 tag field from UTF-8 data. The data pointer is a UTF-8 char
++ string (not UTF-16 as the old, mistyped single handler assumed), so the
++ UTF-8 id3tag_* setters are used - including id3tag_set_fieldvalue_utf8 for
++ 'v', which replaces the removed *_ucs2 calls the UTF-8 path used to make. */
++static int
++set_id3v2tag_utf8(lame_global_flags* gfp, int type, char const* str)
++{
++ switch (type)
++ {
++ case 'a': return id3tag_set_textinfo_utf8(gfp, "TPE1", str);
++ case 't': return id3tag_set_textinfo_utf8(gfp, "TIT2", str);
++ case 'l': return id3tag_set_textinfo_utf8(gfp, "TALB", str);
++ case 'g': return id3tag_set_textinfo_utf8(gfp, "TCON", str);
++ case 'c': return id3tag_set_comment_utf8(gfp, 0, 0, str);
++ case 'n': return id3tag_set_textinfo_utf8(gfp, "TRCK", str);
++ case 'y': return id3tag_set_textinfo_utf8(gfp, "TYER", str);
++ case 'v': return id3tag_set_fieldvalue_utf8(gfp, str);
++ }
++ return -3;
+ }
+ #endif
+
+@@ -480,8 +484,8 @@ id3_tag(lame_global_flags* gfp, int type, TextEncoding enc, char* str)
+ default:
+ #ifdef ID3TAGS_EXTENDED
+ case TENC_LATIN1: result = set_id3tag(gfp, type, x); break;
+- case TENC_UTF16: result = set_id3v2tag(gfp, enc, type, x); break;
+- case TENC_UTF8: result = set_id3v2tag(gfp, enc, type, x); break;
++ case TENC_UTF16: result = set_id3v2tag_utf16(gfp, type, x); break;
++ case TENC_UTF8: result = set_id3v2tag_utf8(gfp, type, x); break;
+ #else
+ case TENC_RAW: result = set_id3tag(gfp, type, x); break;
+ #endif
+diff --git a/include/lame.def b/include/lame.def
+index c1ba2bd1..16f3c592 100644
+--- a/include/lame.def
++++ b/include/lame.def
+@@ -306,3 +306,6 @@ id3tag_set_textinfo_utf8 @2028
+ ; two external functions for ID3v2.4 tag support
+ id3tag_add_v2_4_UTF8 @2029
+ id3tag_v2_4_UTF8_only @2030
++
++; UTF-8 field-value setter (companion to id3tag_set_fieldvalue_utf16)
++id3tag_set_fieldvalue_utf8 @2031
+diff --git a/include/lame.h b/include/lame.h
+index aa53e843..1140c914 100644
+--- a/include/lame.h
++++ b/include/lame.h
+@@ -1296,6 +1296,9 @@ int CDECL id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalu
+ /* experimental */
+ int CDECL id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue);
+
++/* experimental */
++int CDECL id3tag_set_fieldvalue_utf8(lame_t gfp, const char *fieldvalue);
++
+ /* experimental */
+ int CDECL id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text);
+
+diff --git a/include/libmp3lame.sym b/include/libmp3lame.sym
+index 7651fb31..6490b5c0 100644
+--- a/include/libmp3lame.sym
++++ b/include/libmp3lame.sym
+@@ -229,6 +229,7 @@ id3tag_set_textinfo_ucs2
+ id3tag_set_comment_ucs2
+ id3tag_set_fieldvalue_ucs2
+ id3tag_set_fieldvalue_utf16
++id3tag_set_fieldvalue_utf8
+ id3tag_set_textinfo_utf16
+ id3tag_set_comment_utf16
+ id3tag_set_textinfo_utf8
+diff --git a/libmp3lame/id3tag.c b/libmp3lame/id3tag.c
+index 156e7e8b..5a1b75e9 100644
+--- a/libmp3lame/id3tag.c
++++ b/libmp3lame/id3tag.c
+@@ -1844,6 +1844,21 @@ id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue)
+ return id3tag_set_fieldvalue_utf16(gfp, fieldvalue);
+ }
+
++int
++id3tag_set_fieldvalue_utf8(lame_t gfp, const char *fieldvalue)
++{
++ if (is_lame_internal_flags_null(gfp)) {
++ return 0;
++ }
++ if (fieldvalue && *fieldvalue) {
++ if (strlen(fieldvalue) < 5 || fieldvalue[4] != '=') {
++ return -1;
++ }
++ return id3tag_set_textinfo_utf8(gfp, fieldvalue, &fieldvalue[5]);
++ }
++ return 0;
++}
++
+ size_t
+ lame_get_id3v2_tag(lame_t gfp, unsigned char *buffer, size_t size)
+ {
diff --git a/lame.spec b/lame.spec
index 1299801..9f9947f 100644
--- a/lame.spec
+++ b/lame.spec
@@ -1,5 +1,5 @@
Name: lame
-Version: 3.100
+Version: 4.0
Release: %autorelease
Summary: Free MP3 audio compressor
License: LGPL-2.0-or-later AND LGPL-2.1-or-later
@@ -7,10 +7,12 @@ URL: http://lame.sourceforge.net/
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch1: %{name}-noexecstack.patch
Patch2: libmp3lame-symbols.patch
+Patch3: frontend-utf8.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: ncurses-devel
+BuildRequires: pkgconfig(libmpg123)
%ifarch %{ix86}
BuildRequires: nasm
%endif
@@ -82,9 +84,10 @@ make test
%files devel
%doc API HACKING STYLEGUIDE
-%{_libdir}/libmp3lame.so
%{_includedir}/lame
%{_includedir}/lame.h
+%{_libdir}/libmp3lame.so
+%{_libdir}/pkgconfig/lame.pc
%changelog
diff --git a/libmp3lame-symbols.patch b/libmp3lame-symbols.patch
index eb3a3b5..f5e233c 100644
--- a/libmp3lame-symbols.patch
+++ b/libmp3lame-symbols.patch
@@ -1,16 +1,33 @@
---- lame-3.100/include/libmp3lame.sym 2017-09-06 14:33:35.000000000 -0500
-+++ lame-3.100/include/libmp3lame.sym 2017-10-22 16:18:44.708436200 -0500
-@@ -1,5 +1,4 @@
- lame_init
--lame_init_old
- lame_set_num_samples
- lame_get_num_samples
- lame_set_in_samplerate
-@@ -188,6 +187,7 @@ hip_decode_exit
+------------------------------------------------------------------------
+r6564 | aleidinger | 2026-07-12 09:27:09 -0400 (Sun, 12 Jul 2026) | 15 lines
+
+Export the decoder analysis hooks from the shared library
+
+The MP3 decoder's per-frame analysis hooks hip_set_pinfo and
+hip_finish_pinfo belong to the documented decoder API and are used by the
+bundled frontends, but they were missing from the shared library's export
+list. Linking a frontend against the shared library - as
+--enable-dynamic-frontends does - therefore failed with undefined-symbol
+errors. Add both so dynamic-frontend builds link.
+
+hip_set_pinfo is the symbol named in the report; hip_finish_pinfo is a
+second omission of the same kind, reached by the core file reader once the
+first is resolved.
+
+SF bug #515
+
+
+diff --git a/include/libmp3lame.sym b/include/libmp3lame.sym
+index 6490b5c0..471e532d 100644
+--- a/include/libmp3lame.sym
++++ b/include/libmp3lame.sym
+@@ -188,6 +188,8 @@ hip_decode_exit
hip_set_errorf
hip_set_debugf
hip_set_msgf
+hip_set_pinfo
++hip_finish_pinfo
hip_decode
hip_decode_headers
hip_decode1
+------------------------------------------------------------------------
diff --git a/sources b/sources
index e7c7487..53788b0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (lame-3.100.tar.gz) = 0844b9eadb4aacf8000444621451277de365041cc1d97b7f7a589da0b7a23899310afd4e4d81114b9912aa97832621d20588034715573d417b2923948c08634b
+SHA512 (lame-4.0.tar.gz) = 70fa51fe84dd499d171ebf6c05ec82399eb8b0148fb4c08470a61efe9cf826474132ee98166dc63ee5c3646b2c8e955680e4306dd26f590b7810732ab486dd8b
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-21 4:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-21 4:03 [rpms/lame] f45: Update to 4.0 Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox