diff options
Diffstat (limited to 'src/PlaylistQueue.cxx')
-rw-r--r-- | src/PlaylistQueue.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx index 39732676..c52f49a9 100644 --- a/src/PlaylistQueue.cxx +++ b/src/PlaylistQueue.cxx @@ -71,17 +71,14 @@ playlist_open_into_queue(const char *uri, struct playlist *dest, struct player_control *pc, bool secure) { - GMutex *mutex = g_mutex_new(); - GCond *cond = g_cond_new(); + Mutex mutex; + Cond cond; struct input_stream *is; struct playlist_provider *playlist = playlist_open_any(uri, mutex, cond, &is); - if (playlist == NULL) { - g_cond_free(cond); - g_mutex_free(mutex); + if (playlist == NULL) return PLAYLIST_RESULT_NO_SUCH_LIST; - } enum playlist_result result = playlist_load_into_queue(uri, playlist, start_index, end_index, @@ -91,8 +88,5 @@ playlist_open_into_queue(const char *uri, if (is != NULL) input_stream_close(is); - g_cond_free(cond); - g_mutex_free(mutex); - return result; } |