audiod: Avoid starting the wrong decoder on server restarts.
authorAndre Noll <maan@systemlinux.org>
Sat, 19 Dec 2009 15:50:28 +0000 (16:50 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 19 Dec 2009 15:50:28 +0000 (16:50 +0100)
If para_server is restarted and starts streaming using another audio format than
the one used before the restart, para_audiod might end up starting the decoder
associated with the old audio format.

Fix this by invalidating current_audio_format_num in close_stat_pipe() which is
called when the server goes away.

audiod.c

index d39f0f5..1e8591f 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -949,6 +949,7 @@ static void close_stat_pipe(void)
        stat_task->length_seconds = 0;
        stat_task->offset_seconds = 0;
        stat_task->vss_status = 0;
+       stat_task->current_audio_format_num = -1;
        audiod_status_dump();
 }