mpd/src
Max Kellermann 923e66738c player/Thread: fix "single" mode race condition
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
2019-05-20 16:22:01 +02:00
..
AudioCompress audio_{parser,config}: convert to C++ 2013-01-30 21:47:12 +01:00
android check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
archive archive/List: add RAII class 2019-02-05 21:40:07 +01:00
client remove libwrap support 2018-12-28 14:16:02 +01:00
command LocateUri: pass URI plugin kind, optionally disables plugin verify 2019-04-18 10:03:15 +02:00
config event/ServerSocket: runtime error if abstract sockets are unavailable 2019-03-20 13:09:16 +01:00
db Fix meson.build to work properly with '-Ddatabase=false' 2019-04-18 08:55:13 +02:00
decoder decoder/HybridDSD: downgrade log message to "debug" 2019-03-29 17:15:48 +01:00
encoder check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
event event/SocketMonitor: don't cancel if OnSocketReady() returns false 2019-04-04 10:24:58 +02:00
filter filter/AutoConvert: implement Flush() 2019-03-24 22:42:06 +01:00
fs fs/io/OutputStream: update include guard 2019-02-19 12:39:29 +01:00
haiku Haiku: add version info to the resources like win32 does 2019-03-29 14:33:27 +01:00
input input/buffered: check error in IsAvailable() 2019-05-17 12:43:45 +02:00
java check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
lib src/lib/gcrypt/meson.build: use dependency() for quering linker flags 2019-03-18 09:12:19 +01:00
mixer mixer/pulse: add missing ParseFloat() check 2019-02-20 19:27:13 +01:00
neighbor neighbor/smbclient: fix double smbc_closedir() call 2019-04-18 09:40:56 +02:00
net net/IPv[46]Address: add cast to void* to fix GCC9 build failure 2019-04-03 16:59:53 +02:00
output output/httpd: close client connection on error 2019-04-04 09:39:22 +02:00
pcm check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
player player/Thread: fix "single" mode race condition 2019-05-20 16:22:01 +02:00
playlist playlist/flac: copy the URI to fix use-after-free bug 2019-03-14 19:30:33 +01:00
protocol check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
queue check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
song song/TagSongFilter: apply negation properly to multiple tag values 2019-03-16 13:23:02 +01:00
sticker check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
storage storage/udisks2: move empty string check out of the fallback block in MapUTF8() 2019-02-22 15:07:40 +01:00
system system/UniqueFileDescriptor: add CreatePipeNonBlock() 2019-02-27 23:30:56 +01:00
tag tag/Fallback: add API documentation 2019-03-15 19:23:10 +01:00
thread meson.build: remove the libwinpthread-1.dll dependency on Windows 2019-03-14 20:07:06 +01:00
unix unix/SignalHandlers: add RAII class 2019-02-05 21:36:51 +01:00
util util/StringView: add SkipPrefix(), RemoveSuffix() 2019-02-19 11:51:32 +01:00
win32 check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
zeroconf zeroconf/Bonjour: fix OnSocketReady() return value 2019-04-04 10:24:29 +02:00
AudioFormat.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
AudioFormat.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
AudioParser.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
AudioParser.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
BulkEdit.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
CheckAudioFormat.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
CheckAudioFormat.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Chrono.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
CommandLine.cxx CommandLine: fix another build failure with -Ddatabase=false 2019-04-18 09:20:12 +02:00
CommandLine.hxx Main: allocate ConfigData on the stack 2018-08-19 23:08:23 +02:00
GitVersion.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
GitVersion.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
IcyMetaDataParser.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
IcyMetaDataParser.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Idle.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
Idle.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
IdleFlags.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
IdleFlags.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Instance.cxx Instance: use std::unique_ptr<> to manage the Database pointer 2019-02-20 20:48:20 +01:00
Instance.hxx Instance: use std::unique_ptr<> to manage the Database pointer 2019-02-20 20:48:20 +01:00
Listen.cxx Listen: use fs/XDG.hxx 2018-10-31 14:30:34 +01:00
Listen.hxx Listen: use struct ConfigData 2018-07-17 23:02:53 +02:00
LocateUri.cxx LocateUri: pass URI plugin kind, optionally disables plugin verify 2019-04-18 10:03:15 +02:00
LocateUri.hxx LocateUri: pass URI plugin kind, optionally disables plugin verify 2019-04-18 10:03:15 +02:00
Log.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
Log.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
LogBackend.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
LogBackend.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
LogInit.cxx LogInit: add `noexcept` 2019-02-05 21:36:35 +01:00
LogInit.hxx LogInit: add `noexcept` 2019-02-05 21:36:35 +01:00
LogLevel.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
LogV.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Main.cxx Main: create Database on stack, move to Instance after Open() succeeded 2019-02-20 20:50:28 +01:00
Main.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Mapper.cxx Mapper: remove empty function mapper_finish() 2019-02-05 23:01:09 +01:00
Mapper.hxx Mapper: remove empty function mapper_finish() 2019-02-05 23:01:09 +01:00
MixRampInfo.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MusicBuffer.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MusicBuffer.hxx player/Thread: stop buffering if buffer is full 2018-09-21 19:05:25 +02:00
MusicChunk.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MusicChunk.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
MusicChunkPtr.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MusicChunkPtr.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MusicPipe.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
MusicPipe.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Partition.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Partition.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
Permission.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
Permission.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PlaylistDatabase.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PlaylistDatabase.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PlaylistError.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PlaylistError.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PlaylistFile.cxx PlaylistFile: ignore empty playlist names 2019-03-17 23:46:36 +01:00
PlaylistFile.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PlaylistPrint.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
PlaylistPrint.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PlaylistSave.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PlaylistSave.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
PluginUnavailable.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
RemoteTagCache.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
RemoteTagCache.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
RemoteTagCacheHandler.hxx RemoteTagCache: new glue class for integrating RemoteTagScanner 2018-01-30 00:05:57 +01:00
ReplayGainConfig.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
ReplayGainGlobal.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
ReplayGainGlobal.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
ReplayGainInfo.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
ReplayGainInfo.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
ReplayGainMode.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
ReplayGainMode.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SingleMode.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SingleMode.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SongLoader.cxx LocateUri: pass URI plugin kind, optionally disables plugin verify 2019-04-18 10:03:15 +02:00
SongLoader.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
SongPrint.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
SongPrint.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SongSave.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
SongSave.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
SongUpdate.cxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
StateFile.cxx Instance: use std::unique_ptr<> to manage the Database pointer 2019-02-20 20:48:20 +01:00
StateFile.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
StateFileConfig.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
StateFileConfig.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
Stats.cxx Instance: use std::unique_ptr<> to manage the Database pointer 2019-02-20 20:48:20 +01:00
Stats.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
TagArchive.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TagArchive.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TagFile.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TagFile.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TagPrint.cxx TagPrint: omit tags which were disabled by the client 2019-02-22 13:05:38 +01:00
TagPrint.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
TagSave.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TagSave.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
TagStream.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TagStream.hxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TimePrint.cxx check.h: remove obsolete header 2018-11-19 16:33:49 +01:00
TimePrint.hxx *: copyright year 2018 2018-10-31 17:54:59 +01:00
ls.cxx input/Plugin: add attribute `prefixes` 2018-10-24 20:25:32 +02:00
ls.hxx input/Plugin: add attribute `prefixes` 2018-10-24 20:25:32 +02:00
open.h *: copyright year 2018 2018-10-31 17:54:59 +01:00