playlist/SoundCloud: use ScopeLock
This commit is contained in:
		| @@ -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; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann