From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:44:16 +0000 (+0000) Subject: Remove redundant (?) calls to 'prepare_decoding_chain()'. X-Git-Tag: 5.0-post-dev~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee56f778fd188253d74f5167a53aa4136d5db3be;p=thirdparty%2Fshairport-sync.git Remove redundant (?) calls to 'prepare_decoding_chain()'. --- diff --git a/ap2_buffered_audio_processor.c b/ap2_buffered_audio_processor.c index e41ce883..10dd9155 100644 --- a/ap2_buffered_audio_processor.c +++ b/ap2_buffered_audio_processor.c @@ -274,7 +274,7 @@ void *rtp_buffered_audio_processor(void *arg) { if (blocks_read_since_play_began == 1) { debug(2, "Preparing initial decoding chain for %s.", get_ssrc_name(payload_ssrc)); - prepare_decoding_chain(conn, payload_ssrc); + prepare_decoding_chain(conn, payload_ssrc); // needed to set the input rate... sequence_number_for_player = seq_no & 0xffff; // this is arbitrary -- the sequence_number_for_player numbers will // be sequential irrespective of seq_no jumps... @@ -290,7 +290,7 @@ void *rtp_buffered_audio_processor(void *arg) { "Reading a block: new encoding: %s, old encoding: %s. Preparing a new " "decoding chain.", get_ssrc_name(payload_ssrc), get_ssrc_name(previous_ssrc)); - prepare_decoding_chain(conn, payload_ssrc); + // prepare_decoding_chain(conn, payload_ssrc); } } @@ -441,7 +441,7 @@ void *rtp_buffered_audio_processor(void *arg) { int64_t lead_time = buffer_should_be_time - get_absolute_time_in_ns(); payload_length = 0; if (ssrc_is_recognised(payload_ssrc) != 0) { - prepare_decoding_chain(conn, payload_ssrc); + // prepare_decoding_chain(conn, payload_ssrc); unsigned long long new_payload_length = 0; payload_pointer = m + leading_free_space_length; if ((lead_time < (int64_t)30000000000L) && @@ -517,7 +517,7 @@ void *rtp_buffered_audio_processor(void *arg) { } else { timestamp_difference = timestamp - expected_timestamp; if (timestamp_difference != 0) { - debug(2, + debug(1, "Connection %d: " "unexpected timestamp in block %u. Actual: %u, expected: %u " "difference: %d, " @@ -542,7 +542,7 @@ void *rtp_buffered_audio_processor(void *arg) { int32_t abs_timestamp_difference = -timestamp_difference; if ((size_t)abs_timestamp_difference > get_ssrc_block_length(payload_ssrc)) { skip_this_block = 1; - debug(2, + debug(1, "skipping block %u because it is too old. Timestamp " "difference: %d, length of block: %u.", seq_no, timestamp_difference, get_ssrc_block_length(payload_ssrc)); diff --git a/player.c b/player.c index 2aa0cd7b..b2242b18 100644 --- a/player.c +++ b/player.c @@ -1034,7 +1034,7 @@ void prepare_decoding_chain(rtsp_conn_info *conn, ssrc_t ssrc) { if ((config.statistics_requested != 0) && (ssrc != SSRC_NONE) && (conn->incoming_ssrc != SSRC_NONE)) { - debug(1, "Connection %d: incoming audio switching to \"%s\".", conn->connection_number, + debug(3, "Connection %d: incoming audio switching to \"%s\".", conn->connection_number, get_ssrc_name(ssrc)); #ifdef CONFIG_METADATA send_ssnc_metadata('sdsc', get_ssrc_name(ssrc), strlen(get_ssrc_name(ssrc)), 1); @@ -2728,8 +2728,8 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn, int resync_requested) { debug(2, "setting up software resampler for %s for the first time.", get_ssrc_name(curframe->ssrc)); } else { - debug(2, "SSRC has changed from %s to %s.", get_ssrc_name(conn->resampler_ssrc), - get_ssrc_name(curframe->ssrc)); + debug(1, "Connection %d: incoming audio switching to \"%s\".", conn->connection_number, + get_ssrc_name(curframe->ssrc)); clear_software_resampler(conn); // ask the backend if it can give us its best choice for an ffmpeg configuration: } diff --git a/rtsp.c b/rtsp.c index dc82dcb5..eff9fdf7 100644 --- a/rtsp.c +++ b/rtsp.c @@ -2739,7 +2739,7 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) // airplay 2 always allows interruption, so should never return // play_lock_aquisition_failed if (get_play_lock(conn, 1) != play_lock_aquisition_failed) { - debug(1, "Connection %d: %s AP2 setup -- play lock acquired.", conn->connection_number, + debug(2, "Connection %d: %s AP2 setup -- play lock acquired.", conn->connection_number, get_category_string(conn->airplay_stream_category)); #ifdef CONFIG_METADATA @@ -2910,7 +2910,7 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) // since the GID from the client has been acquired, update the airplay bonjour strings. build_bonjour_strings(conn); - debug(1, "Connection %d: SETUP mdns_update on %s.", conn->connection_number, + debug(2, "Connection %d: SETUP mdns_update on %s.", conn->connection_number, get_category_string(conn->airplay_stream_category)); mdns_update(NULL, secondary_txt_records);