Merge branch 'development' of github.com:aillwee/shairport-sync into charles-dev

This commit is contained in:
Charles
2021-05-13 21:24:31 +01:00
3 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([shairport-sync], [4.0d3], [4265913+mikebrady@users.noreply.github.com])
AC_INIT([shairport-sync], [4.0d4], [4265913+mikebrady@users.noreply.github.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
+2 -9
View File
@@ -1186,7 +1186,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
}
}
} else {
debug(1, "Unexpected response to getting dac delay: %d.", resp);
debug(3, "Unexpected response to getting dac delay: %d.", resp);
}
}
}
@@ -2306,14 +2306,7 @@ void *player_thread_func(void *arg) {
sync_error, (sync_error * 1.0) / config.output_rate);
int64_t local_frames_to_drop = sync_error / conn->output_sample_ratio;
uint32_t frames_to_drop_sized = local_frames_to_drop;
debug_mutex_lock(&conn->flush_mutex, 1000, 1);
conn->flush_rtp_timestamp =
inframe->given_timestamp +
frames_to_drop_sized; // flush all packets up to (and including?) this
reset_input_flow_metrics(conn);
debug_mutex_unlock(&conn->flush_mutex, 3);
do_flush(inframe->given_timestamp + frames_to_drop_sized, conn);
} else if ((sync_error < 0) && ((-sync_error) > filler_length)) {
debug(1,
"Large negative sync error of: %" PRId64
+10 -1
View File
@@ -1274,7 +1274,8 @@ int get_ptp_anchor_local_time_info(rtsp_conn_info *conn, uint32_t *anchorRTP,
if ((clock_status_t)response != conn->clock_status) {
switch (response) {
case clock_ok:
debug(1, "Connection %d: NQPTP clock is valid and available.", conn->connection_number);
debug(1, "Connection %d: NQPTP new master clock % " PRIx64 ".", conn->connection_number,
actual_clock_id);
break;
case clock_service_unavailable:
debug(1, "Connection %d: NQPTP clock is not available.", conn->connection_number);
@@ -1311,6 +1312,14 @@ int get_ptp_anchor_local_time_info(rtsp_conn_info *conn, uint32_t *anchorRTP,
}
conn->clock_status = response;
}
if ((response != clock_ok) && (conn->last_anchor_info_is_valid != 0)) {
if (anchorRTP != NULL)
*anchorRTP = conn->anchor_rtptime;
if (anchorLocalTime != NULL)
*anchorLocalTime = conn->anchor_time - conn->last_anchor_clock_offset;
response = clock_ok;
}
return response;
}