Apparently all other C libraries are not compatible with "constexpr".
Those which are not will get a performance penalty, but at least they
work at all.
The initgroups() manpage says we need to check for _BSD_SOURCE. The
thing is that glibc deprecated this macro, and doesn't define it
anymore, effectively breaking all MPD supplementary groups.
The real fix is to check for initgroups() availability at configure
time, instead of relying on the deprecated _BSD_SOURCE macro.
Apply padding only to the fseek(), not to the chunk size. This fixes
bogus "failed to read riff chunk" messages when the last chunk has an
odd size.
See http://bugs.musicpd.org/view.php?id=4486
systemd does not understand LimitRTTIME=-1. For no limit we have to use
the string 'infinity' (see systemd.exec(5)).
Signed-off-by: Christian Hesse <mail@eworm.de>
Add ALSA_LIBS to MIXER_LIBS, otherwise building mpd in a static context fails
with lot of undefined references to alsa-lib (libasound) required by
src/mixer/plugins/AlsaMixerPlugin.cxx.
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
This systemd feature has been removed a while ago without replacement,
and it turns out that systemd developers suggest not using control
groups at all to assign real-time privileges. Therfore, a replacement
feature will not be implement in future systemd releases, and we can
really remove those lines completely.
See http://bugs.musicpd.org/view.php?id=4413
Allocate the buffer dynamically using av_malloc(), and free
AVIOContext.buffer in the destructor, as mandated by the libavformat
documentation.
Fixes http://bugs.musicpd.org/view.php?id=4446
If the song tag comes from a stream, and MPD playback restarts, MPD
would believe the tag should override the newly received tag. This
makes the previous tag appear stuck. This change passes the song tag
only if it's authoritative - i.e. if it's a song file.
Right after booting, the monotonic clock starts with a very small
value, and AudioOutput::LockUpdate() may believe that the fail_timer
has not recovered yet.
Ask FFmpeg to seek to the next packet boundary *before* the seek
position, so we don't miss audio data. Now we get too much, but we'll
solve that in the next commit.
The Connect method can be called between Schedule and lock. In that case, when
locked, the state is already set to CONNECTING of READY and the condition won't
be signaled anymore.
Not initialising granulepos leads to it having arbitrary values in the
encoded stream including possibly negative values which are not valid
and confuse opusdec. Explicitly initialise opus_encoder::granulepos
to avoid that problem.