Compare commits

...

15 Commits

Author SHA1 Message Date
Max Kellermann
b5bd294e5c release v0.23.16 2024-12-03 12:56:57 +01:00
Max Kellermann
ac60bd47f0 thread/WindowsFuture: add missing include for std::error_category 2024-12-03 12:54:12 +01:00
Max Kellermann
b7248f0333 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
2024-12-03 12:52:15 +01:00
Marius Feraru
8a5b5378e6 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
2024-12-03 12:49:02 +01:00
Michael Cho
4a49f75799 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]: 199bc82702

Closes https://github.com/MusicPlayerDaemon/MPD/issues/2151
2024-12-03 12:47:55 +01:00
Max Kellermann
9d2666f293 subprojects: update sqlite3 to 3.47.1-1 2024-12-03 12:46:33 +01:00
Max Kellermann
e63fcc5982 python/build/libs: update libnfs to 5.0.3 2024-12-03 12:45:05 +01:00
Max Kellermann
4c37c17f2e python/build/libs.py: update WildMidi to 0.4.6 2024-12-03 12:44:33 +01:00
Max Kellermann
722820a375 python/build/libs: update zlib to 1.3.1 2024-12-03 12:44:14 +01:00
Max Kellermann
688023eb9e python/build/libs.py: update libopenmpt to 0.7.9 2024-12-03 12:43:34 +01:00
Max Kellermann
5771aeaddd subprojects: update fmt to 11.0.2-1 2024-12-03 12:42:02 +01:00
Rudi Heitbaum
a42da90042 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 <rudi@heitbaum.com>

Closes https://github.com/MusicPlayerDaemon/MPD/issues/2141
2024-12-03 12:42:02 +01:00
Max Kellermann
d7d32ed6fc meson.build: suppress -Wnan-infinity-disabled (clang 18) due to libfmt 2024-12-03 12:40:21 +01:00
Max Kellermann
4715acf27e Log: add missing include for std::back_inserter()
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2071
2024-12-03 12:38:00 +01:00
Max Kellermann
8780db5ee8 increment version number to 0.23.16 2024-12-03 12:34:01 +01:00
16 changed files with 70 additions and 46 deletions

8
NEWS

@@ -1,3 +1,11 @@
ver 0.23.16 (2024/12/03)
* database
- fix integer overflows with 64-bit inode numbers
* filter
- ffmpeg: fix for filters producing no output
* support libfmt 11
* support ICU 76
ver 0.23.15 (2023/12/20)
* decoder
- ffmpeg: fix build failure with FFmpeg 6.1

@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd"
android:installLocation="auto"
android:versionCode="73"
android:versionName="0.23.15">
android:versionCode="74"
android:versionName="0.23.16">
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="30"/>

@@ -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',
@@ -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 + [

@@ -57,9 +57,9 @@ flac = AutotoolsProject(
)
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',
)
@@ -116,8 +116,8 @@ libmodplug = AutotoolsProject(
)
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,12 +129,12 @@ libopenmpt = AutotoolsProject(
'--without-portaudio', '--without-portaudiocpp', '--without-sndfile',
'--without-flac',
],
base='libopenmpt-0.6.6+release.autotools',
base='libopenmpt-0.7.9+release.autotools',
)
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',
@@ -644,8 +644,8 @@ curl = CmakeProject(
)
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 @@ libnfs = AutotoolsProject(
'--disable-utils', '--disable-examples',
],
base='libnfs-libnfs-5.0.2',
base='libnfs-libnfs-5.0.3',
autoreconf=True,
)

@@ -23,6 +23,8 @@
#include <fmt/format.h>
#include <iterator> // for std::back_inserter()
static constexpr Domain exception_domain("exception");
void

@@ -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)

@@ -66,6 +66,9 @@ FfmpegFilter::FilterPCM(ConstBuffer<void> 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);

@@ -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 <cstdint>
/**
* 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<void> FilterPCM(ConstBuffer<void> src) override;
};
#endif

@@ -29,7 +29,7 @@ template<>
struct fmt::formatter<AVSampleFormat> : formatter<string_view>
{
template<typename FormatContext>
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 = "?";

@@ -39,7 +39,7 @@ template<>
struct fmt::formatter<SampleFormat> : formatter<string_view>
{
template<typename FormatContext>
auto format(const SampleFormat format, FormatContext &ctx) {
auto format(const SampleFormat format, FormatContext &ctx) const {
return formatter<string_view>::format(sample_format_to_string(format),
ctx);
}
@@ -49,7 +49,7 @@ template<>
struct fmt::formatter<AudioFormat> : formatter<string_view>
{
template<typename FormatContext>
auto format(const AudioFormat &af, FormatContext &ctx) {
auto format(const AudioFormat &af, FormatContext &ctx) const {
return formatter<string_view>::format(ToString(af).c_str(),
ctx);
}

@@ -38,7 +38,7 @@ template<>
struct fmt::formatter<std::exception_ptr> : formatter<string_view>
{
template<typename FormatContext>
auto format(std::exception_ptr e, FormatContext &ctx) {
auto format(std::exception_ptr e, FormatContext &ctx) const {
return formatter<string_view>::format(GetFullMessage(e), ctx);
}
};

@@ -29,7 +29,7 @@ template<>
struct fmt::formatter<Path> : formatter<string_view>
{
template<typename FormatContext>
auto format(Path path, FormatContext &ctx) {
auto format(Path path, FormatContext &ctx) const {
return formatter<string_view>::format(path.ToUTF8(), ctx);
}
};

@@ -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,
],

@@ -24,6 +24,7 @@
#include "WindowsCond.hxx"
#include <memory>
#include <system_error> // for std::error_category
#include <variant>
enum class WinFutureErrc : int {

@@ -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

@@ -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