From 63cec24cc12522e25223cee8c932a88da466140e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 4 Jul 2010 23:27:37 +0200 Subject: [PATCH] audiod: Set the audio format restart barrier also when closing the receiver. When the current audio file changes, it may happen that para_audiod's receiver detects the EOF condition before the status has been updated to reflect the file change. In this case, para_audiod might restart the old receiver even if a different audio format is about to be streamed next. This patch adds a per audio format 200ms delay which starts at receiver close time. During this time interval the receiver for this audio format will not be started again. --- audiod.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audiod.c b/audiod.c index 5c17e6ea..668b0f74 100644 --- a/audiod.c +++ b/audiod.c @@ -358,6 +358,8 @@ static void close_receiver(int slot_num) btr_free_node(s->receiver_node->btrn); free(s->receiver_node); s->receiver_node = NULL; + tv_add(now, &(struct timeval)EMBRACE(0, 200 * 1000), + &a->restart_barrier); } static void writer_cleanup(struct writer_node *wn) -- 2.39.5