Defer buffered AirPlay 2 latency offset conversion

This commit is contained in:
prhodey
2026-08-19 20:10:50 -04:00
parent 427061fb48
commit 4df0145372
2 changed files with 7 additions and 7 deletions
+5 -2
View File
@@ -1488,8 +1488,11 @@ int get_ptp_anchor_local_time_info(rtsp_conn_info *conn, uint32_t *anchorRTP,
}
if (conn->last_anchor_info_is_valid != 0) {
if (anchorRTP != NULL)
*anchorRTP = conn->last_anchor_rtptime;
if (anchorRTP != NULL) {
// Use the current rate in case the stream format has changed.
int32_t added_latency = (int32_t)(config.audio_backend_latency_offset * conn->input_rate);
*anchorRTP = conn->last_anchor_rtptime - added_latency;
}
if (anchorLocalTime != NULL)
*anchorLocalTime = conn->last_anchor_local_time;
}