• Max Kellermann's avatar
    PlayerThread: fix stuck MPD after song change (0.18.2 regression) · 2789493a
    Max Kellermann authored
    Commit 77c63511 caused MPD to become stuck right after a song change.
    The problem was that at some point, the MusicBuffer became full, and
    the DecoderThread working on the next song waits for the PlayerThread.
    However, the PlayerThread was stuck in a loop of g_usleep() calls, and
    never bothered to tell the DecoderThread that the MusicBuffer is not
    full anymore.  This bug is very old, but its chance to occur went from
    nearly 0% to nearly 100%.
    
    The fix is to wake up the DecoderThread before waiting for it.  As a
    side effect, I replaced the g_usleep() call with a Cond::Wait() call.
    2789493a
Name
Last commit
Last update
doc Loading commit data...
m4 Loading commit data...
scripts Loading commit data...
src Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
UPGRADING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
mpd.service.in Loading commit data...
valgrind.suppressions Loading commit data...