From: Andre Noll Date: Thu, 22 Apr 2010 21:05:26 +0000 (+0200) Subject: audiod: Avoid busy loop in standby/off mode. X-Git-Tag: v0.4.2~4 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=e3af6b4410d78e266d5459063a31b2aadb055145 audiod: Avoid busy loop in standby/off mode. Without this patch, must_start_decoder() incorrectly returned true if para_server is announcing a stream but the audiod status is not on. This results in status_pre_select() requesting a minimal delay. --- diff --git a/audiod.c b/audiod.c index 32047a1f..1bed20c0 100644 --- a/audiod.c +++ b/audiod.c @@ -633,6 +633,8 @@ static bool must_start_decoder(void) int cafn = stat_task->current_audio_format_num; unsigned vs = stat_task->vss_status; + if (audiod_status != AUDIOD_ON) + return false; if (cafn < 0) return false; if (!stat_task->ct)