audiod: Invalidate current audio format on close.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 5 Sep 2014 07:09:03 +0000 (09:09 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 21 Sep 2014 11:22:12 +0000 (13:22 +0200)
Without this, audiod might start the next decoder instance too early,
using the audio format of the current file. The oss writer seems to
be particularly prone in triggering this.

audiod.c

index a072071..6dfef3a 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -390,6 +390,7 @@ static void close_receiver(int slot_num)
        task_reap(&s->receiver_node->task);
        free(s->receiver_node);
        s->receiver_node = NULL;
+       stat_task->current_audio_format_num = -1;
        tv_add(now, &(struct timeval)EMBRACE(0, 200 * 1000),
                &a->restart_barrier);
 }