playlist/SoundCloud: use ScopeLock
This commit is contained in:
parent
33b70567c8
commit
c155df5d79
@ -242,7 +242,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
|
||||
return -1;
|
||||
}
|
||||
|
||||
mutex.lock();
|
||||
const ScopeLock protect(mutex);
|
||||
|
||||
yajl_status stat;
|
||||
int done = 0;
|
||||
@ -259,7 +259,6 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
|
||||
if (input_stream->IsEOF()) {
|
||||
done = true;
|
||||
} else {
|
||||
mutex.unlock();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -277,8 +276,6 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
|
||||
}
|
||||
}
|
||||
|
||||
mutex.unlock();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user