From 8780db5ee89b0f40c714f4b13089e3a5aea6eadb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Dec 2024 12:34:01 +0100 Subject: [PATCH 01/15] increment version number to 0.23.16 --- NEWS | 2 ++ android/AndroidManifest.xml | 4 ++-- meson.build | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index e3585b8cad..4ebaca70f5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.23.16 (not yet released) + ver 0.23.15 (2023/12/20) * decoder - ffmpeg: fix build failure with FFmpeg 6.1 diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 447a682516..3957d58502 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="74" + android:versionName="0.23.16"> diff --git a/meson.build b/meson.build index 8a15274e61..406395d58a 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'mpd', ['c', 'cpp'], - version: '0.23.15', + version: '0.23.16', meson_version: '>= 0.56.0', default_options: [ 'c_std=c11', From 4715acf27e5ccbd48bde60f6756931d7a1aac06d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 7 Jul 2024 10:09:08 +0200 Subject: [PATCH 02/15] Log: add missing include for std::back_inserter() Closes https://github.com/MusicPlayerDaemon/MPD/issues/2071 --- src/Log.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Log.cxx b/src/Log.cxx index 505ff3e4a4..c4cdaab571 100644 --- a/src/Log.cxx +++ b/src/Log.cxx @@ -23,6 +23,8 @@ #include +#include // for std::back_inserter() + static constexpr Domain exception_domain("exception"); void From d7d32ed6fce8b310799747d9d9fd8d15b8868810 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 11 Mar 2024 15:15:13 +0100 Subject: [PATCH 03/15] meson.build: suppress -Wnan-infinity-disabled (clang 18) due to libfmt --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 406395d58a..605245b2e6 100644 --- a/meson.build +++ b/meson.build @@ -76,6 +76,9 @@ test_common_flags = [ # suppress bogus GCC12 warnings in libfmt headers '-Wno-stringop-overflow', + + # libfmt causes this warning due to -ffast-math + '-Wno-nan-infinity-disabled', ] test_global_cxxflags = test_global_common_flags + [ From a42da90042e5b9d956dbdd4145176524057c8e4b Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Fri, 5 Jul 2024 14:27:45 +0000 Subject: [PATCH 04/15] lib/fmt: support build with libfmt-11.0.0 Upstream libfmt commit fmtlib/fmt@d707292 now requires the format function to be const. Adjust the function prototype so it is const and can compile. Signed-off-by: Rudi Heitbaum Closes https://github.com/MusicPlayerDaemon/MPD/issues/2141 --- NEWS | 1 + src/lib/ffmpeg/LibFmt.hxx | 2 +- src/lib/fmt/AudioFormatFormatter.hxx | 4 ++-- src/lib/fmt/ExceptionFormatter.hxx | 2 +- src/lib/fmt/PathFormatter.hxx | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 4ebaca70f5..2137da84fc 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.23.16 (not yet released) +* support libfmt 11 ver 0.23.15 (2023/12/20) * decoder diff --git a/src/lib/ffmpeg/LibFmt.hxx b/src/lib/ffmpeg/LibFmt.hxx index 93bf57e6af..4045158930 100644 --- a/src/lib/ffmpeg/LibFmt.hxx +++ b/src/lib/ffmpeg/LibFmt.hxx @@ -29,7 +29,7 @@ template<> struct fmt::formatter : formatter { template - auto format(const AVSampleFormat format, FormatContext &ctx) { + auto format(const AVSampleFormat format, FormatContext &ctx) const { const char *name = av_get_sample_fmt_name(format); if (name == nullptr) name = "?"; diff --git a/src/lib/fmt/AudioFormatFormatter.hxx b/src/lib/fmt/AudioFormatFormatter.hxx index 6838644c4d..e06e7c3d83 100644 --- a/src/lib/fmt/AudioFormatFormatter.hxx +++ b/src/lib/fmt/AudioFormatFormatter.hxx @@ -39,7 +39,7 @@ template<> struct fmt::formatter : formatter { template - auto format(const SampleFormat format, FormatContext &ctx) { + auto format(const SampleFormat format, FormatContext &ctx) const { return formatter::format(sample_format_to_string(format), ctx); } @@ -49,7 +49,7 @@ template<> struct fmt::formatter : formatter { template - auto format(const AudioFormat &af, FormatContext &ctx) { + auto format(const AudioFormat &af, FormatContext &ctx) const { return formatter::format(ToString(af).c_str(), ctx); } diff --git a/src/lib/fmt/ExceptionFormatter.hxx b/src/lib/fmt/ExceptionFormatter.hxx index 31c9f0df2c..d193689fa4 100644 --- a/src/lib/fmt/ExceptionFormatter.hxx +++ b/src/lib/fmt/ExceptionFormatter.hxx @@ -38,7 +38,7 @@ template<> struct fmt::formatter : formatter { template - auto format(std::exception_ptr e, FormatContext &ctx) { + auto format(std::exception_ptr e, FormatContext &ctx) const { return formatter::format(GetFullMessage(e), ctx); } }; diff --git a/src/lib/fmt/PathFormatter.hxx b/src/lib/fmt/PathFormatter.hxx index 91aca6c7c8..0f4477850e 100644 --- a/src/lib/fmt/PathFormatter.hxx +++ b/src/lib/fmt/PathFormatter.hxx @@ -29,7 +29,7 @@ template<> struct fmt::formatter : formatter { template - auto format(Path path, FormatContext &ctx) { + auto format(Path path, FormatContext &ctx) const { return formatter::format(path.ToUTF8(), ctx); } }; From 5771aeadddf47f9f6f9db857b4e68e2a5c751792 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Dec 2024 12:37:23 +0100 Subject: [PATCH 05/15] subprojects: update fmt to 11.0.2-1 --- subprojects/fmt.wrap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/subprojects/fmt.wrap b/subprojects/fmt.wrap index bc109cc3b0..fd508477fc 100644 --- a/subprojects/fmt.wrap +++ b/subprojects/fmt.wrap @@ -1,13 +1,13 @@ [wrap-file] -directory = fmt-10.1.1 -source_url = https://github.com/fmtlib/fmt/archive/10.1.1.tar.gz -source_filename = fmt-10.1.1.tar.gz -source_hash = 78b8c0a72b1c35e4443a7e308df52498252d1cefc2b08c9a97bc9ee6cfe61f8b -patch_filename = fmt_10.1.1-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/fmt_10.1.1-1/get_patch -patch_hash = adec33acaf87c0859c52b242a44bc71c3427751da3f1adaed511f4186794a42f -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_10.1.1-1/fmt-10.1.1.tar.gz -wrapdb_version = 10.1.1-1 +directory = fmt-11.0.2 +source_url = https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz +source_filename = fmt-11.0.2.tar.gz +source_hash = 6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f +patch_filename = fmt_11.0.2-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/fmt_11.0.2-1/get_patch +patch_hash = 90c9e3b8e8f29713d40ca949f6f93ad115d78d7fb921064112bc6179e6427c5e +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_11.0.2-1/fmt-11.0.2.tar.gz +wrapdb_version = 11.0.2-1 [provide] fmt = fmt_dep From 688023eb9e6255147ab912e1cb3b8a756fa3bcc6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Jul 2024 13:07:49 +0200 Subject: [PATCH 06/15] python/build/libs.py: update libopenmpt to 0.7.9 --- python/build/libs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 2bc9674d36..68a5648d74 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -116,8 +116,8 @@ ) libopenmpt = AutotoolsProject( - 'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.7.3+release.autotools.tar.gz', - '2cf8369b7916b09264f3f14b9fb6cef35a6e9bee0328dec4f49d98211ccfd722', + 'https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-0.7.9+release.autotools.tar.gz', + '0386e918d75d797e79d5b14edd0847165d8b359e9811ef57652c0a356a2dfcf4', 'lib/libopenmpt.a', [ '--disable-shared', '--enable-static', @@ -129,7 +129,7 @@ '--without-portaudio', '--without-portaudiocpp', '--without-sndfile', '--without-flac', ], - base='libopenmpt-0.6.6+release.autotools', + base='libopenmpt-0.7.9+release.autotools', ) wildmidi = CmakeProject( From 722820a37573061d23d08df909036488ad9cdb7d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 11 Mar 2024 15:17:47 +0100 Subject: [PATCH 07/15] python/build/libs: update zlib to 1.3.1 --- python/build/libs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 68a5648d74..7398af85ca 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -57,9 +57,9 @@ ) zlib = ZlibProject( - ('http://zlib.net/zlib-1.3.tar.xz', - 'https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.xz'), - '8a9ba2898e1d0d774eca6ba5b4627a11e5588ba85c8851336eb38de4683050a7', + ('http://zlib.net/zlib-1.3.1.tar.xz', + 'https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.xz'), + '38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32', 'lib/libz.a', ) From 4c37c17f2ead20044101621b2c8f3bc326e7fc82 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 15 Apr 2024 21:52:20 +0200 Subject: [PATCH 08/15] python/build/libs.py: update WildMidi to 0.4.6 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 7398af85ca..a01835fcad 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -133,8 +133,8 @@ ) wildmidi = CmakeProject( - 'https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.5/wildmidi-0.4.5.tar.gz', - 'd5e7bef00a7aa47534a53d43b1265f8d3d27f6a28e7f563c1cdf02ff4fa35b99', + 'https://github.com/Mindwerks/wildmidi/releases/download/wildmidi-0.4.6/wildmidi-0.4.6.tar.gz', + '24ca992639ce76efa3737029fceb3672385d56e2ac0a15d50b40cc12d26e60de', 'lib/libWildMidi.a', [ '-DBUILD_SHARED_LIBS=OFF', From e63fcc5982638a58978ff73c1a9a658d8dfd8b7e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 11 Mar 2024 15:20:32 +0100 Subject: [PATCH 09/15] python/build/libs: update libnfs to 5.0.3 --- python/build/libs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index a01835fcad..a1456c79dc 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -644,8 +644,8 @@ ) libnfs = AutotoolsProject( - 'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.2.tar.gz', - '637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3', + 'https://github.com/sahlberg/libnfs/archive/libnfs-5.0.3.tar.gz', + 'd945cb4f4c8f82ee1f3640893a168810f794a28e1010bb007ec5add345e9df3e', 'lib/libnfs.a', [ '--disable-shared', '--enable-static', @@ -656,7 +656,7 @@ '--disable-utils', '--disable-examples', ], - base='libnfs-libnfs-5.0.2', + base='libnfs-libnfs-5.0.3', autoreconf=True, ) From 9d2666f293270f7dd091903027527f4d3ba5e3ae Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Dec 2024 12:46:32 +0100 Subject: [PATCH 10/15] subprojects: update sqlite3 to 3.47.1-1 --- subprojects/sqlite3.wrap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/subprojects/sqlite3.wrap b/subprojects/sqlite3.wrap index 9b85ce93ec..70410cf3b8 100644 --- a/subprojects/sqlite3.wrap +++ b/subprojects/sqlite3.wrap @@ -1,13 +1,13 @@ [wrap-file] -directory = sqlite-amalgamation-3410200 -source_url = https://www.sqlite.org/2023/sqlite-amalgamation-3410200.zip -source_filename = sqlite-amalgamation-3410200.zip -source_hash = 01df06a84803c1ab4d62c64e995b151b2dbcf5dbc93bbc5eee213cb18225d987 -patch_filename = sqlite3_3.41.2-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.41.2-2/get_patch -patch_hash = 246681dfb731a14bfa61bcde651d5581a7e1c7d14851bfb57a941fac540a6810 -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlite3_3.41.2-2/sqlite-amalgamation-3410200.zip -wrapdb_version = 3.41.2-2 +directory = sqlite-amalgamation-3470100 +source_url = https://www.sqlite.org/2024/sqlite-amalgamation-3470100.zip +source_filename = sqlite-amalgamation-3470100.zip +source_hash = 9da21e6b14ef6a943cdc30f973df259fb390bb4483f77e7f171b9b6e977e5458 +patch_filename = sqlite3_3.47.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.47.1-1/get_patch +patch_hash = 7a298e69c663abfccd2d3632c6897b4f90627d36fd7fa137240c1d97c9a86466 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlite3_3.47.1-1/sqlite-amalgamation-3470100.zip +wrapdb_version = 3.47.1-1 [provide] sqlite3 = sqlite3_dep From 4a49f7579973c7b6554598fcbb2d82ae37de3487 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sat, 26 Oct 2024 10:29:53 -0400 Subject: [PATCH 11/15] meson.build: support building with ICU 76 ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer add `icu-uc` when linking to shared libraries. This results in failure: ``` src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76' ``` [^1]: https://github.com/unicode-org/icu/commit/199bc827021ffdb43b6579d68e5eecf54c7f6f56 Closes https://github.com/MusicPlayerDaemon/MPD/issues/2151 --- NEWS | 1 + src/lib/icu/meson.build | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 2137da84fc..4e52ba89b9 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ver 0.23.16 (not yet released) * support libfmt 11 +* support ICU 76 ver 0.23.15 (2023/12/20) * decoder diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build index 92f9e6b1f9..3d52213a98 100644 --- a/src/lib/icu/meson.build +++ b/src/lib/icu/meson.build @@ -1,5 +1,7 @@ -icu_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu')) -conf.set('HAVE_ICU', icu_dep.found()) +icu_i18n_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu')) +icu_uc_dep = dependency('icu-uc', version: '>= 50', required: get_option('icu')) +have_icu = icu_i18n_dep.found() and icu_uc_dep.found() +conf.set('HAVE_ICU', have_icu) icu_sources = [ 'CaseFold.cxx', @@ -13,7 +15,7 @@ if is_windows endif iconv_dep = [] -if icu_dep.found() +if have_icu icu_sources += [ 'Util.cxx', 'Init.cxx', @@ -44,7 +46,8 @@ icu = static_library( icu_sources, include_directories: inc, dependencies: [ - icu_dep, + icu_i18n_dep, + icu_uc_dep, iconv_dep, fmt_dep, ], From 8a5b5378e64ac780dbb8fedf7b24b63ca78b78f5 Mon Sep 17 00:00:00 2001 From: Marius Feraru Date: Mon, 4 Mar 2024 13:21:40 +0200 Subject: [PATCH 12/15] db/update/Walk:FindAncestorLoop: uint64_t inode & device Previously, inode numbers were truncated to 32 bits, which could lead to problems on XFS where inodes are 64 bit; this could lead to bogus "recursive directory found" errors during database update. [mk: added commit description and NEWS line] Closes https://github.com/MusicPlayerDaemon/MPD/issues/2000 --- NEWS | 2 ++ src/db/update/Walk.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4e52ba89b9..8abcffd47e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.23.16 (not yet released) +* database + - fix integer overflows with 64-bit inode numbers * support libfmt 11 * support ICU 76 diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index 4fdec28d94..14af4dd4dd 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -153,7 +153,7 @@ update_directory_stat(Storage &storage, Directory &directory) noexcept */ static int FindAncestorLoop(Storage &storage, Directory *parent, - unsigned inode, unsigned device) noexcept + uint64_t inode, uint64_t device) noexcept { #ifndef _WIN32 if (device == 0 && inode == 0) From b7248f033365f0bc73dd8c19ac59b3a3d74b9bbe Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 2 Nov 2024 22:23:25 +0100 Subject: [PATCH 13/15] filter/ffmpeg: fill `AVFrame::pts` Some libavfilter plugins don't produce any output if `pts` is never set, e.g. the `lowpass` plugin. Closes https://github.com/MusicPlayerDaemon/MPD/issues/2114 --- NEWS | 2 ++ src/filter/plugins/FfmpegFilter.cxx | 3 +++ src/filter/plugins/FfmpegFilter.hxx | 12 ++++++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 8abcffd47e..95c330ab1a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.23.16 (not yet released) * database - fix integer overflows with 64-bit inode numbers +* filter + - ffmpeg: fix for filters producing no output * support libfmt 11 * support ICU 76 diff --git a/src/filter/plugins/FfmpegFilter.cxx b/src/filter/plugins/FfmpegFilter.cxx index 324b88ec2f..cc835ea7d2 100644 --- a/src/filter/plugins/FfmpegFilter.cxx +++ b/src/filter/plugins/FfmpegFilter.cxx @@ -66,6 +66,9 @@ FfmpegFilter::FilterPCM(ConstBuffer src) #endif frame->nb_samples = src.size / in_audio_frame_size; + frame->pts = pts; + pts += frame->nb_samples; + frame.GetBuffer(); memcpy(frame.GetData(0), src.data, src.size); diff --git a/src/filter/plugins/FfmpegFilter.hxx b/src/filter/plugins/FfmpegFilter.hxx index 6f7c3773cc..edd8fef737 100644 --- a/src/filter/plugins/FfmpegFilter.hxx +++ b/src/filter/plugins/FfmpegFilter.hxx @@ -17,14 +17,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MPD_FFMPEG_FILTER__HXX -#define MPD_FFMPEG_FILTER__HXX +#pragma once #include "filter/Filter.hxx" #include "lib/ffmpeg/Buffer.hxx" #include "lib/ffmpeg/Filter.hxx" #include "lib/ffmpeg/Frame.hxx" +#include + /** * A #Filter implementation using FFmpeg's libavfilter. */ @@ -46,6 +47,11 @@ class FfmpegFilter final : public Filter { const size_t in_audio_frame_size; const size_t out_audio_frame_size; + /** + * Presentation timestamp. A counter for `AVFrame::pts`. + */ + int_least64_t pts = 0; + public: /** * @param _graph a checked and configured AVFilterGraph @@ -63,5 +69,3 @@ public: /* virtual methods from class Filter */ ConstBuffer FilterPCM(ConstBuffer src) override; }; - -#endif From ac60bd47f04d5c8ebf1abf58e8b49f0b4158c2ee Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Dec 2024 12:54:11 +0100 Subject: [PATCH 14/15] thread/WindowsFuture: add missing include for std::error_category --- src/thread/WindowsFuture.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/thread/WindowsFuture.hxx b/src/thread/WindowsFuture.hxx index dd2543cf46..78d3672281 100644 --- a/src/thread/WindowsFuture.hxx +++ b/src/thread/WindowsFuture.hxx @@ -24,6 +24,7 @@ #include "WindowsCond.hxx" #include +#include // for std::error_category #include enum class WinFutureErrc : int { From b5bd294e5c88c062b1a9c0c4c60397fbf7f3f1c5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 3 Dec 2024 12:56:57 +0100 Subject: [PATCH 15/15] release v0.23.16 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 95c330ab1a..1e155b9f4f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.23.16 (not yet released) +ver 0.23.16 (2024/12/03) * database - fix integer overflows with 64-bit inode numbers * filter