From fb00e7fddc0e1d03cf26533a8b64c7778e5920ae Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Dec 2010 08:05:36 +0100 Subject: add void casts to suppress "result unused" warnings (clang) --- src/output_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/output_thread.c') diff --git a/src/output_thread.c b/src/output_thread.c index 380956fac..a334fcef5 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -303,7 +303,7 @@ ao_wait(struct audio_output *ao) GTimeVal tv; g_get_current_time(&tv); g_time_val_add(&tv, delay * 1000); - g_cond_timed_wait(ao->cond, ao->mutex, &tv); + (void)g_cond_timed_wait(ao->cond, ao->mutex, &tv); if (ao->command != AO_COMMAND_NONE) return false; -- cgit v1.2.3 From 5f06999686b1c02c3dc612fe8a6a84ebecc76405 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Jan 2011 23:08:18 +0100 Subject: output_thread: fix double lock During the whole output thread, the audio_output object is locked, and it is only unlocked while waiting for the GCond and while running a plugin method. The error handler in ao_play_chunk() attempted to lock the object again, which was code from MPD 0.15.x which should have been removed a long time ago. --- src/output_thread.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/output_thread.c') diff --git a/src/output_thread.c b/src/output_thread.c index a334fcef5..a5244c693 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -463,12 +463,9 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk) /* don't automatically reopen this device for 10 seconds */ - g_mutex_lock(ao->mutex); - assert(ao->fail_timer == NULL); ao->fail_timer = g_timer_new(); - g_mutex_unlock(ao->mutex); return false; } -- cgit v1.2.3