Max Kellermann
f6c65cba58
release v0.22.3
2020-11-06 16:12:54 +01:00
Max Kellermann
f849b07766
storage/curl: fix nullptr dereference
...
Pass a std::string to PathTraitsUTF8::Relative(), implicitly casting
it to std::string_view. This selects the right overload which returns
std::string_view instead of `const char *`; the latter could return
`nullptr` which would cause the implicit conversion of the return
value to std::string_view to crash.
Regression caused by commits ead208987d
and a98d627c0b
.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/995
2020-11-06 15:35:47 +01:00
Rosen Penev
071d3c71d8
clang-tidy: replace std::bind with lambdas
...
Found with modernize-avoid-bind
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-05 18:09:30 -08:00
Max Kellermann
afbcac9fb1
util/MimeType: use IterableSplitString() in ParseMimeTypeParameters()
2020-11-04 21:29:42 +01:00
Max Kellermann
51e5b56b3a
playlist/registry: remove duplicate function ExtractMimeTypeMainPart()
...
This is the same as GetMimeTypeBase(), which has already been applied.
2020-11-04 21:20:43 +01:00
Max Kellermann
bb07fd42ce
util/MimeType: migrate GetMimeTypeBase() to std::string_view
2020-11-04 21:20:03 +01:00
Max Kellermann
bab626c325
util/UriExtract: remove the query string at the beginning of uri_get_suffix()
2020-11-04 21:15:41 +01:00
Max Kellermann
2a9131498f
util/UriExtract: pass std::string_view to uri_get_suffix()
2020-11-04 21:13:57 +01:00
Max Kellermann
35a232105e
util/UriExtract: uri_get_suffix() returns std::string_view
...
No need to copy it to a buffer.
2020-11-04 21:08:26 +01:00
Max Kellermann
19dd1a25d7
{decoder,archive,playlist}/plugin: pass std::string_view to SupportsMimeType()
2020-11-04 21:00:49 +01:00
Max Kellermann
53396c0e50
Merge branch 'v0.22.x' into master
2020-11-04 20:37:25 +01:00
Max Kellermann
0b8208fe7f
Merge branch 'clng11' of git://github.com/neheb/MPD into master
2020-11-04 20:34:55 +01:00
Max Kellermann
2da3cff1e8
filter/LoadChain: use the AutoConvertFilter
...
This adds support for input samples other than 16 bit to the FFmpeg
filter plugin.
2020-11-04 20:15:19 +01:00
Max Kellermann
0c965d0573
filter/AutoConvert: move the Filter class to TwoFilters.cxx
2020-11-04 20:15:19 +01:00
Max Kellermann
77c14692c9
filter/AutoConvert: eliminate AutoConvertFilter if possible
...
If no conversion is necessary, return the child Filter as-is. This
allows removing all nullptr checks from AutoConvertFilter.
2020-11-04 20:15:19 +01:00
Max Kellermann
226eb26300
filter/ffmpeg: interleave the output AVFrame
...
If the FFmpeg filter outputs planar data, interleave it, just like the
FFmpeg decoder plugin does.
2020-11-04 20:15:19 +01:00
Max Kellermann
2d606fa989
decoder/ffmpeg: move code to lib/ffmpeg/Interleave.cxx
...
To be reused by the FFmpeg filter plugin.
2020-11-04 20:15:19 +01:00
Max Kellermann
7a0342c8bb
decoder/ffmpeg: use AVFrame fields instead of AVCodecContext fields
2020-11-04 20:06:45 +01:00
Max Kellermann
42c9d765cf
lib/ffmpeg/Buffer: add missing include
2020-11-04 20:06:41 +01:00
Max Kellermann
a8a80ee689
lib/ffmpeg/Buffer: disallow copying
2020-11-04 19:51:21 +01:00
Max Kellermann
f9bdb4b0b8
lib/ffmpeg/Buffer: add noexcept
2020-11-04 19:50:38 +01:00
Max Kellermann
9332527872
lib/ffmpeg/{Buffer,Time}: remove obsolete "#undef SampleFormat"
...
This compatibility macro has been removed from FFmpeg long ago.
2020-11-04 19:50:33 +01:00
Max Kellermann
84f772357e
filter/convert: convert_filter_new() returns std::unique_ptr
2020-11-04 16:47:11 +01:00
Max Kellermann
f2b9785a67
filter/chain: pass std::string_view to filter_chain_append()
2020-11-04 16:37:53 +01:00
Max Kellermann
eeaec99c59
filter/LoadChain: use IterableSplitString()
2020-11-04 16:36:11 +01:00
Max Kellermann
b0002e3b73
filter/chain: copy the child name
...
filter_chain_parse() passes a temporary string pointer which results
in a use-after-free in the PreparedChainFilter::Child::Open() error
message.
2020-11-04 16:34:38 +01:00
Max Kellermann
27c589da97
filter/chain: remove unused field ChainFilter::Child::name
2020-11-04 16:26:50 +01:00
Max Kellermann
6484af472b
increment version number to 0.22.3
2020-11-04 16:14:40 +01:00
Max Kellermann
92a218b7a9
playlist/registry: add option "as_directory"
...
This allows users to disable the "CUE files as directories" feature
without having to disable the CUE playlist plugin completely. This
feature has been annoying some users.
2020-11-04 16:13:12 +01:00
Max Kellermann
d69a1f98af
doc/plugins.rst: more markup
2020-11-04 16:11:26 +01:00
Max Kellermann
23a6f62ea3
doc/user.rst: fix typo
2020-11-04 15:59:40 +01:00
Max Kellermann
e0d3ca71b3
meson.build: switch to C11
...
It's been 9 years already, and there's no point in insisting on the 21
year old C standard. MPD doesn't have a lot of C code left, but why
not compile it with the latest language revision.
2020-11-04 14:38:58 +01:00
Max Kellermann
4f40b9f7cf
meson.build: disable ld.so lazy binding and enable relro
...
Since MPD is a long-running daemon, it doesn't make sense to use
dynamic binding. That allows the relocations to be read-only
("relro"), which a hardening feature.
2020-11-04 13:43:21 +01:00
Max Kellermann
bb009daf66
playlist/registry: simplify ExtractMimeTypeMainPart()
2020-11-04 13:34:04 +01:00
Max Kellermann
3d276d50b4
event/PollBackend: use vector::push_back() instead of resize()
2020-10-30 16:35:20 +01:00
Max Kellermann
b1b731340e
event/PollBackend: add Item constructor
2020-10-30 16:32:45 +01:00
Max Kellermann
b9b02b4ff2
event/PollBackend: use unordered_map::find() instead of operator[]
...
The latter creates a new object, but we know that the key already
exists.
2020-10-30 16:25:41 +01:00
Max Kellermann
ab5d23da11
event/PollBackend: use unordered_map::emplace() in Add()
2020-10-30 16:24:32 +01:00
Max Kellermann
0554fe3652
event/PollBackend: use std::size_t
2020-10-30 16:09:29 +01:00
Max Kellermann
b0282fe36f
event/PollGroupWinSelect: add Item constructor
2020-10-30 16:07:23 +01:00
Max Kellermann
69b45e693b
event/WinSelect: use unordered_map::find() instead of operator[]
...
The latter creates a new object, but we know that the key already
exists.
2020-10-30 16:05:25 +01:00
Max Kellermann
9e97acc28d
event/WinSelect: merge duplicate code into ApplyReady()
2020-10-30 15:55:23 +01:00
Max Kellermann
b1e446a931
event/WinSelect: add missing const
to deleted copy ctor/operator
2020-10-30 15:45:29 +01:00
Max Kellermann
938319cd44
event/WinSelect: reorder method prototypes
2020-10-30 15:45:12 +01:00
Max Kellermann
fee29001fa
event/WinSelect: use unordered_map::emplace() in Add()
...
This allow using erase() with iterator, without a key lookup.
2020-10-30 15:32:11 +01:00
Max Kellermann
6d894a1806
event/WinSelect: use SOCKET as std::unordered_map key
2020-10-30 15:25:09 +01:00
Rosen Penev
f1fc5d79ca
clang-tidy: convert to all/any_of
...
Found with readability-use-anyofallof
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-28 15:51:21 -07:00
Max Kellermann
bb99cf37e3
release v0.22.2
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl+Zm30QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEm0BD/0eeuI09j2LPCCQQdOUxl3ydWDLVVqDbT/b
wUYLFEIscr0Kr8k4Mcl3C5LBEeCJq4ZYQ/VqlgNVC11SXVhq7IHJALJ3rYQVIpx+
7MGfd1M0G39d9nlEFeKG2iNKx78aiBTqkMC9MtctacIOiKmntXP0cZZxpqGMMVZs
5t8l8i2CM35BWisu0PjSvPJMzGVf9lgEIqx1ejHBFrX6V6DEZ8d6KEbV9FulNo1Y
bH1UmKdsz71LC1ZE9EescmL5kVvaXyWyJmDDiu2/sqcMRjAHl2+RIAsunv6SqdGH
Sk4OZbtXB8M8EQHuSJESUS6SnQEyGdwCptBn4NHXkajzRJqKCq0FRDyQGT+qrmUr
H+91rZeWRYFbBMStP9l9MMQiTTjXgfCnHExDK9AmrMhiuYnuVxV1deEP7FXswCkd
yU3sPpcKgdzMEYzoTuzXJVyMIKr0WOmNGFMEUbxfBXZDCbT1i9SH+Bi0kQAYe9h9
JQTSWeS5NDRcI/b6nHS6ccUGFEp1scbXQNLw+17UvrUwfeZW9N9/t6jPS4kdUNEm
tnNmbM/3o7yT3B8BGKTl5qBVSjCcgqKfsBXvy9Qn2zE0TN4HQPiJSDXZEH9LuZR1
c6b8aI94gZkN4av1OAjmZgLyn+Pr2gyrei4FQNXyjNJkV5F3wiiLhhDTEMc2WLNm
Zf4qpZArww==
=eRNp
-----END PGP SIGNATURE-----
Merge tag 'v0.22.2' into master
release v0.22.2
2020-10-28 17:33:10 +01:00
Max Kellermann
dc432f3ffa
release v0.22.2
2020-10-28 17:25:33 +01:00
Max Kellermann
37710195ca
meson_options.txt: disable the "smbclient" plugin by default
...
The bug https://bugzilla.samba.org/show_bug.cgi?id=11413 makes MPD
crash after at most a minute of using the plugin. Since this bug is
five years old already and it doesn't look like it will ever be fixed,
all libsmbclient code in MPD is scheduled for removal. For now, the
plugin is disabled by default so people are less likely to hit the
crash bug.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/991
2020-10-28 17:21:27 +01:00