InputStream: add static method OpenReady()

Merge some duplicate code.
This commit is contained in:
Max Kellermann
2013-12-29 18:08:49 +01:00
parent ea9aff1d3f
commit aeb2baa495
11 changed files with 47 additions and 62 deletions

View File

@@ -92,7 +92,7 @@ int main(int argc, char **argv)
if (playlist == NULL) {
/* open the stream and wait until it becomes ready */
is = InputStream::Open(uri, mutex, cond, error);
is = InputStream::OpenReady(uri, mutex, cond, error);
if (is == NULL) {
if (error.IsDefined())
LogError(error);
@@ -102,8 +102,6 @@ int main(int argc, char **argv)
return 2;
}
is->LockWaitReady();
/* open the playlist */
playlist = playlist_list_open_stream(*is, uri);