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 d39f0f57620b80f8791bd7eeca015df2af566ea7..1e8591f0c1b1986d5b141217e13295a2c05b6392 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->length_seconds = 0;
        stat_task->offset_seconds = 0;
        stat_task->vss_status = 0;
+       stat_task->current_audio_format_num = -1;
        audiod_status_dump();
 }
 
        audiod_status_dump();
 }