playlist/PlaylistRegistry: use LockRewind() instead of Rewind()

Fixes a deadlock caused by commit
31ab78ae8e.  That commit was not
actually bad - just these two calls have always been bad, which went
unnoticed for a long time.
This commit is contained in:
Max Kellermann 2017-11-14 21:19:22 +01:00
parent 014f8cd693
commit c98bc4a243

View File

@ -195,7 +195,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime)
/* rewind the stream, so each plugin gets a
fresh start */
try {
is->Rewind();
is->LockRewind();
} catch (const std::runtime_error &) {
}
@ -239,7 +239,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix)
/* rewind the stream, so each plugin gets a
fresh start */
try {
is->Rewind();
is->LockRewind();
} catch (const std::runtime_error &) {
}