]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Fix a bug by ensuring certain ap2 variables are initialised by the player thread.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 14 Nov 2021 11:18:39 +0000 (11:18 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 14 Nov 2021 11:18:39 +0000 (11:18 +0000)
player.c

index 6408a00663dcd9d56b8eeeb7fe5df537a93ce183..0084ab5ee95570db6f1fcb4eb7e4420bff3e4332 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1727,6 +1727,13 @@ void *player_thread_func(void *arg) {
   conn->flush_rtp_timestamp = 0;  // it seems this number has a special significance -- it seems to
                                   // be used as a null operand, so we'll use it like that too
   conn->fix_volume = 0x10000;
+  
+#ifdef CONFIG_AIRPLAY_2
+  conn->ap2_flush_requested = 0;
+  conn->ap2_flush_from_valid = 0;
+  conn->ap2_rate = 0;
+  conn->ap2_play_enabled = 0;
+#endif
 
   reset_anchor_info(conn);