From 2ee047a1ddf2bb4d7e25a259492952c6128a749d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Nov 2010 23:40:43 +0100 Subject: output_internal: protect attribute "fail_timer" with mutex --- src/output_thread.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/output_thread.c') diff --git a/src/output_thread.c b/src/output_thread.c index e652eae57..b97694169 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -105,7 +105,12 @@ 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