diff --git a/NEWS b/NEWS index b41747167..7674566a8 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ ver 0.24 (not yet released) * remove Haiku support ver 0.23.10 (not yet released) +* decoder + - ffmpeg: fix libfmt 9 compiler warning * encoder - flac: fix failure when libFLAC is built without Ogg support * Windows diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index 1f8d1d664..8792316f1 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -31,6 +31,7 @@ #include "lib/ffmpeg/Format.hxx" #include "lib/ffmpeg/Codec.hxx" #include "lib/ffmpeg/SampleFormat.hxx" +#include "lib/ffmpeg/LibFmt.hxx" #include "../DecoderAPI.hxx" #include "FfmpegMetaData.hxx" #include "FfmpegIo.hxx" diff --git a/src/lib/ffmpeg/LibFmt.hxx b/src/lib/ffmpeg/LibFmt.hxx new file mode 100644 index 000000000..93bf57e6a --- /dev/null +++ b/src/lib/ffmpeg/LibFmt.hxx @@ -0,0 +1,39 @@ +/* + * Copyright 2003-2022 The Music Player Daemon Project + * http://www.musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#pragma once + +extern "C" { +#include +} + +#include + +template<> +struct fmt::formatter : formatter +{ + template + auto format(const AVSampleFormat format, FormatContext &ctx) { + const char *name = av_get_sample_fmt_name(format); + if (name == nullptr) + name = "?"; + + return formatter::format(name, ctx); + } +}; diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap index 8cb17ba72..a659cdf56 100644 --- a/subprojects/expat.wrap +++ b/subprojects/expat.wrap @@ -3,10 +3,10 @@ directory = expat-2.4.8 source_url = https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz source_filename = expat-2.4.8.tar.bz2 source_hash = f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25 -patch_filename = expat_2.4.8-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.8-1/get_patch -patch_hash = 9aec253a2c6d1c0feb852c5c6920298d14701eeec7acc6832bb402438b52112a +patch_filename = expat_2.4.8-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.4.8-2/get_patch +patch_hash = e8855d668a0dee74dee909521c91d6723f564167fcad65507fec63b0f2b41f7e +wrapdb_version = 2.4.8-2 [provide] expat = expat_dep - diff --git a/subprojects/fmt.wrap b/subprojects/fmt.wrap index 366e7bb85..bcc6e0467 100644 --- a/subprojects/fmt.wrap +++ b/subprojects/fmt.wrap @@ -1,12 +1,12 @@ [wrap-file] -directory = fmt-8.1.1 -source_url = https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz -source_filename = fmt-8.1.1.tar.gz -source_hash = 3d794d3cf67633b34b2771eb9f073bde87e846e0d395d254df7b211ef1ec7346 -patch_filename = fmt_8.1.1-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/fmt_8.1.1-2/get_patch -patch_hash = cd001046281330a8862591780a9ea71a1fa594edd0d015deb24e44680c9ea33b -wrapdb_version = 8.1.1-2 +directory = fmt-9.0.0 +source_url = https://github.com/fmtlib/fmt/archive/9.0.0.tar.gz +source_filename = fmt-9.0.0.tar.gz +source_hash = 9a1e0e9e843a356d65c7604e2c8bf9402b50fe294c355de0095ebd42fb9bd2c5 +patch_filename = fmt_9.0.0-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/fmt_9.0.0-1/get_patch +patch_hash = 5f12924065e0fe7ccae40593d256a082955c273cb2880b3e3de05df9d8d10697 +wrapdb_version = 9.0.0-1 [provide] fmt = fmt_dep diff --git a/subprojects/sqlite3.wrap b/subprojects/sqlite3.wrap index 39434f566..d6af58006 100644 --- a/subprojects/sqlite3.wrap +++ b/subprojects/sqlite3.wrap @@ -1,12 +1,12 @@ [wrap-file] -directory = sqlite-amalgamation-3380000 -source_url = https://sqlite.org/2022/sqlite-amalgamation-3380000.zip -source_filename = sqlite-amalgamation-3380000.zip -source_hash = e055f6054e97747a135c89e36520c0a423249e8a91c5fc445163f4a6adb20df6 -patch_filename = sqlite3_3.38.0-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.38.0-1/get_patch -patch_hash = 49e30bf010ff63ab772d5417885e6905379025ceac80382e292c6dbd3a9da744 +directory = sqlite-amalgamation-3390300 +source_url = https://sqlite.org/2022/sqlite-amalgamation-3390300.zip +source_filename = sqlite-amalgamation-3390300.zip +source_hash = a89db3030d229d860ae56a8bac50ac9761434047ae886e47e7c8f9f428fa98ad +patch_filename = sqlite3_3.39.3-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/sqlite3_3.39.3-1/get_patch +patch_hash = f5c41ff7b3da1108ed221b9a820b41188550cafb8a6c3d247bb40bd598775050 +wrapdb_version = 3.39.3-1 [provide] sqlite3 = sqlite3_dep - diff --git a/subprojects/vorbis.wrap b/subprojects/vorbis.wrap index 6c1a9a94d..7425c11ec 100644 --- a/subprojects/vorbis.wrap +++ b/subprojects/vorbis.wrap @@ -3,13 +3,12 @@ directory = libvorbis-1.3.7 source_url = https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.xz source_filename = libvorbis-1.3.7.tar.xz source_hash = b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b -patch_filename = vorbis_1.3.7-3_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/vorbis_1.3.7-3/get_patch -patch_hash = 6cb90a61ede8c64d3e8e379b96dcc800c9dd69e925122b3d73d8f59a563c3afa -wrapdb_version = 1.3.7-3 +patch_filename = vorbis_1.3.7-4_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/vorbis_1.3.7-4/get_patch +patch_hash = 979e22b24b16c927040700dfd8319cd6ba29bf52a14dbc66b1cb4ea60504f14a +wrapdb_version = 1.3.7-4 [provide] vorbis = vorbis_dep vorbisfile = vorbisfile_dep vorbisenc = vorbisenc_dep -