From 6f3d70b5e24cebbd6fd8c3a665a801628ef912ff Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 27 Jan 2013 17:20:50 +0100 Subject: DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond --- src/SongUpdate.cxx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/SongUpdate.cxx') diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index 120aaf537..ce678fe06 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -117,13 +117,8 @@ song_file_update(struct song *song) song->mtime = st.st_mtime; - GMutex *mutex = NULL; - GCond *cond; -#if !GCC_CHECK_VERSION(4, 2) - /* work around "may be used uninitialized in this function" - false positive */ - cond = NULL; -#endif + Mutex mutex; + Cond cond; do { /* load file tag */ @@ -140,8 +135,6 @@ song_file_update(struct song *song) /* open the input_stream (if not already open) */ if (is == NULL) { - mutex = g_mutex_new(); - cond = g_cond_new(); is = input_stream_open(path_fs.c_str(), mutex, cond, NULL); @@ -168,11 +161,6 @@ song_file_update(struct song *song) if (is != NULL) input_stream_close(is); - if (mutex != NULL) { - g_cond_free(cond); - g_mutex_free(mutex); - } - if (song->tag != NULL && tag_is_empty(song->tag)) tag_scan_fallback(path_fs.c_str(), &full_tag_handler, song->tag); -- cgit v1.2.3