From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 22 Sep 2022 17:19:46 +0000 (+0100) Subject: Roll back fix for extra frames -- it fixes sync issues but introduces transients... X-Git-Tag: 4.1-rc1~20^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6bb33dcaf65b041ca367dd6b5a7329496a00c1c;p=thirdparty%2Fshairport-sync.git Roll back fix for extra frames -- it fixes sync issues but introduces transients or glitches. Not nice. --- diff --git a/rtp.c b/rtp.c index 567b5b9c..55a70680 100644 --- a/rtp.c +++ b/rtp.c @@ -2584,9 +2584,13 @@ void *rtp_buffered_audio_processor(void *arg) { // Put an arbitrary last-ditch limit of 64 blocks_read_since_flush in case it all goes wrong... - if ((timestamp_difference < 0) && (streaming_has_started == 64) && (blocks_read_since_flush < 64)) { + //if ((timestamp_difference < 0) && (streaming_has_started == 64) && (blocks_read_since_flush < 64)) { // debug(1,"skipping packet %u.", pcm_buffer_read_point_rtptime); - } else { + //} else { + // if (streaming_has_started >= 59) && (streaming_has_started <= 64) { + // streaming_has_started++; + //} else { + { // if it's not the very first block of AAC, but is from the first few blocks of a new AAC sequence, // it will contain noisy transients, so replace it with silence. if ((blocks_read_since_flush <= 2) && (blocks_read_since_flush != blocks_read)) {