diff options
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistRegistry.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/PlaylistRegistry.cxx b/src/PlaylistRegistry.cxx index 65f55e6ff..17cad3db5 100644 --- a/src/PlaylistRegistry.cxx +++ b/src/PlaylistRegistry.cxx @@ -269,9 +269,7 @@ playlist_list_open_stream_suffix(InputStream &is, const char *suffix) SongEnumerator * playlist_list_open_stream(InputStream &is, const char *uri) { - const char *suffix; - - is.LockWaitReady(); + assert(is.ready); const char *const mime = is.GetMimeType(); if (mime != nullptr) { @@ -280,7 +278,7 @@ playlist_list_open_stream(InputStream &is, const char *uri) return playlist; } - suffix = uri != nullptr ? uri_get_suffix(uri) : nullptr; + const char *suffix = uri != nullptr ? uri_get_suffix(uri) : nullptr; if (suffix != nullptr) { auto playlist = playlist_list_open_stream_suffix(is, suffix); if (playlist != nullptr) @@ -317,7 +315,7 @@ playlist_list_open_path(const char *path_fs, Mutex &mutex, Cond &cond, return nullptr; Error error; - InputStream *is = InputStream::Open(path_fs, mutex, cond, error); + InputStream *is = InputStream::OpenReady(path_fs, mutex, cond, error); if (is == nullptr) { if (error.IsDefined()) LogError(error); @@ -325,8 +323,6 @@ playlist_list_open_path(const char *path_fs, Mutex &mutex, Cond &cond, return nullptr; } - is->LockWaitReady(); - auto playlist = playlist_list_open_stream_suffix(*is, suffix); if (playlist != nullptr) *is_r = is; |