InputStream: add static method OpenReady()
Merge some duplicate code.
This commit is contained in:
@@ -254,8 +254,8 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
|
||||
Mutex &mutex, Cond &cond)
|
||||
{
|
||||
Error error;
|
||||
InputStream *input_stream = InputStream::Open(url, mutex, cond,
|
||||
error);
|
||||
InputStream *input_stream = InputStream::OpenReady(url, mutex, cond,
|
||||
error);
|
||||
if (input_stream == nullptr) {
|
||||
if (error.IsDefined())
|
||||
LogError(error);
|
||||
@@ -263,7 +263,6 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
|
||||
}
|
||||
|
||||
mutex.lock();
|
||||
input_stream->WaitReady();
|
||||
|
||||
yajl_status stat;
|
||||
int done = 0;
|
||||
|
||||
Reference in New Issue
Block a user