From ba1fc33672986502651b097a41ca7068aff9acba Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 20 Feb 2024 18:03:50 -0600 Subject: [PATCH] Fix spurious asserts in the unencrypted audio path with Sunshine --- src/AudioStream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AudioStream.c b/src/AudioStream.c index 5bc5946..d14d572 100644 --- a/src/AudioStream.c +++ b/src/AudioStream.c @@ -226,8 +226,9 @@ static void decodeInputData(PQUEUED_AUDIO_PACKET packet) { else { // Opus header should stay constant for the entire stream. // If it doesn't, it may indicate that the RtpAudioQueue - // incorrectly recovered a data shard. - LC_ASSERT_VT(((uint8_t*)(rtp + 1))[0] == opusHeaderByte); + // incorrectly recovered a data shard. Sunshine violates + // this for surround sound in some cases, so just ignore it. + LC_ASSERT_VT(((uint8_t*)(rtp + 1))[0] == opusHeaderByte || IS_SUNSHINE()); } #endif