aboutsummaryrefslogtreecommitdiff
path: root/src/SongUpdate.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-27 17:20:50 +0100
committerMax Kellermann <max@duempel.org>2013-01-27 18:39:32 +0100
commit6f3d70b5e24cebbd6fd8c3a665a801628ef912ff (patch)
tree88ab67b76bac4b88422c3debe7c46d6168a71934 /src/SongUpdate.cxx
parent257a0dee758049586efbf0dc3f0339b0cef03456 (diff)
DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond
Diffstat (limited to 'src/SongUpdate.cxx')
-rw-r--r--src/SongUpdate.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index 120aaf53..ce678fe0 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);