From 4dbb445f8b904505cf1b898172f55c0fd8cf756d Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 16 Jan 2023 21:13:18 -0600 Subject: [PATCH] Suppress Opus header assert with Sunshine --- src/AudioStream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AudioStream.c b/src/AudioStream.c index 34b7017..5fdc707 100644 --- a/src/AudioStream.c +++ b/src/AudioStream.c @@ -215,8 +215,9 @@ static void decodeInputData(PQUEUED_AUDIO_PACKET packet) { // Opus header should stay constant for the entire stream. // If it doesn't, it may indicate that the RtpAudioQueue // incorrectly recovered a data shard or the decryption - // of the audio packet failed. - LC_ASSERT(decryptedOpusData[0] == opusHeaderByte); + // of the audio packet failed. Sunshine violates this for + // surround sound in some cases, so just ignore it. + LC_ASSERT(decryptedOpusData[0] == opusHeaderByte || IS_SUNSHINE()); } #endif