Age | Commit message (Collapse) | Author |
|
Instead of passing tag and group, pass an array of tags. To support a
nested return value, return a nested std::map of std::maps. Each key
specifies the tag value, and each value may be another nesting level.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/408
|
|
Since we now don't duplicate all items, we can easily remove the 64kB
limit from OpusReader::ReadString() and instead silently ignore and
skip all strings which are longer than 4 kB.
This fixes a tag duplication bug with Opus file containing a very long
`METADATA_BLOCK_PICTURE` tag, which occurred because the Opus plugin
returned false after parsing all tags, and then the MPD core fell back
to FFmpeg which scanned the tags again.
|
|
Return `404 not found` for some common well-known paths, as clients requesting them usually do that automatically and don't expect endless audio stram.
Closes #572
|
|
memcmp use may result in out of bounds access
|
|
|
|
This reverts commit ff3e2c05142c94efadee00812ec348c15f1be1ba. The
check was necessary, after all, because this is what checked whether
the decoder had finished the current or the next song.
> The "queued" flag can only possibly be set if the decoder is still
> decoding the current song or if the decoder is stopped.
That was wrong because ProcessCommand() sets `queued=true` and also
starts the decoder (if it was idle).
> This is also what the following assert() checks.
That was also wrong, because the assert() has two conditions.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/566
|
|
If the decoder finishes decoding the current song between the two
IsIdle() checks, MPD stops playback instead of starting the decoder
for the next song.
This is usually not visible problem, because the main thread restarts
it via playlist::ResumePlayback(), but that way it, ignores "single"
mode.
As a workaround, this commit adds another "queued" check which
re-enters the player loop and checks again whether to start the
decoder.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/556
|
|
The "queued" flag can only possibly be set if the decoder is still
decoding the current song or if the decoder is stopped. This is also
what the following assert() checks. This check was not necessary.
|
|
|
|
|
|
|
|
|
|
This enables the input buffer for remote files and caches file
contents in MPD.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/376
|
|
Commit b3a458338a7c8ff3c230ee33d85e973d3dbc056a added a LocateUri()
call to several playlist commands, which applied InputPlugin URI
scheme verification to playlist URIs. This broke the SoundCloud
playlist plugin which uses "soundcloud://" URIs for which no input
plugin exists.
This commit allows the caller to specify the kind of plugin which
shall be used to verify the URI. Right now, only "input" is
implemented; "storage" uses the "input" verification for now; and
"playlist" has no verification at all (for now).
Closes https://github.com/MusicPlayerDaemon/MPD/issues/528
|
|
There is already one call in ReadServers(), which is the correct place
to do it.
|
|
Split several printf() calls to make it easier to deal with all those
#ifdefs.
|
|
|
|
Expect OnSocketReady() to cancel events. If it returns false, the
SocketMonitor may be destructed already. This fixes a use-after-free
bug in the "httpd" output plugin.
|
|
|
|
Keep the SocketMonitor registered. This wrong return value was added
6 years ago in commit 72cf8dd8a0451a4d9dae14a68483dc31adc61b09, andd
apparently, nobody ever noticed.
|
|
This missing piece probably never really hurt, because
HttpdClient::OnSocketClosed() would be called right after a socket
error, but it's better to be explicit about closing on error.
|
|
|
|
|
|
Fixes:
src/net/IPv4Address.hxx: In member function 'constexpr IPv4Address::operator SocketAddress() const':
src/net/IPv4Address.hxx:171:24: error: a reinterpret_cast is not a constant expression
171 | return SocketAddress((const struct sockaddr *)&address,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/net/IPv6Address.hxx: In member function 'constexpr IPv6Address::operator SocketAddress() const':
src/net/IPv6Address.hxx:138:24: error: a reinterpret_cast is not a constant expression
138 | return SocketAddress((const struct sockaddr *)&address,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Closes https://github.com/MusicPlayerDaemon/MPD/issues/522
|
|
Let the caller decide what to do with the original exception.
|
|
Preserve the original exception.
|
|
This plugin is interesting only for a tiny fraction of MPD users, so
let's not spam everybody else's log with it.
|
|
Closes https://github.com/MusicPlayerDaemon/MPD/issues/234
|
|
Fixes #184.
Semaphores are kernel-managed objects, calling delete_sem() twice is not more
dangerous than calling close() twice on an fd though, it would just return
an error.
|
|
|
|
The custom_command was run in src/haiku/ and created a file with only resources inside.
Since xres edits the file in-place and meson doesn't like it, we have to run a shell script for now.
Maybe later I'll add proper support in meson.
|
|
|
|
|
|
|
|
|
|
Closes https://github.com/MusicPlayerDaemon/MPD/issues/510
|
|
.. and not "UNIX domain socket. Be consistent about the naming.
|
|
Since version 0.49.0 the Meson build system has native support for
finding and using the gcrypt library using the `dependency()` function.
`dependency()` has the advantage over `find_library()` as it queries the
required linker flags for proper linking with external libraries, e.g.
libgpg-error.
As the latest released version 1.8.4 of libgcrypt does not
provide a .pc file, using `libgcrypt-config` is the only way to query
the required linker flags.
Unfortunately, there is an issue when cross compiling mpd and the user does not
define `libgcrypt-config` in the cross file. If the user sets the qobuz feature
to `auto` and the target does not have libgcrypt installed, the Meson
build system will falsly assume libgcrypt is available for the target as
it uses the native `libgcrypt-config` on the host and pretend is has
found the library.
Therefore, we still rely on `find_library()` to workaround this buggy
behavior. This way, if qobuz feature detection is set to `auto`, the
feature is disabled in case there is no target libgcrypt available.
Fixes building mpd statically with the qobuz feature enabled. Otherwise
the build fails with undefined references because of the missing libgpg-error
dependency:
```
/sysroot/usr/lib/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_strerror':
visibility.c:(.text+0x14): undefined reference to `gpg_strerror'
```
|
|
Closes https://github.com/MusicPlayerDaemon/MPD/issues/465 and
https://github.com/MusicPlayerDaemon/MPD/pull/466
|
|
And disable libvorbis detection if Tremor was explicitly enabled.
This fixes a crash bug caused by libvorbis/Tremor ABI conflict caused
by commit 4f7d52dbf2eaee15a517363c846650d76f45739f
|
|
Previously, MPD would skip the current song after attempting to seek
to its beginnig, because that was a seek to offset 0. At offset 0,
MPD will see the BOS packet again, which results in throwing
StopDecoder in MPDOpusDecoder::OnOggEnd().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/470
|
|
|
|
|
|
Unlike pa_channel_map_init_auto(), pa_channel_map_init_extend() does
not fail if there is no valid mapping for the given channel count, but
instead maps additional "AUX" channels.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/493
|
|
The `tag_builder.empty()` check was wrong for the SubmitReplayGain()
call.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/497
|
|
The old implementation didn't make a lot of sense; the "!=" operator
was not actually the opposite of "==".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/505
|
|
|
|
|
|
|
|
|