From: Mike Brady Date: Sun, 21 Oct 2018 15:31:55 +0000 (+0100) Subject: Use a parameter rather than a hard-wired input rate. X-Git-Tag: 3.3RC0~190^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5f165d982774665bec5988085579c65c2b03f3d;p=thirdparty%2Fshairport-sync.git Use a parameter rather than a hard-wired input rate. --- diff --git a/rtp.c b/rtp.c index 599d5a48..e2c8f944 100644 --- a/rtp.c +++ b/rtp.c @@ -1074,7 +1074,7 @@ int frame_to_local_time(uint32_t timestamp, uint64_t *time, rtsp_conn_info *conn uint64_t timestamp_interval_time; uint64_t remote_time_of_timestamp; uint32_t timestamp_interval = rtp_frame_offset(conn->reference_timestamp,timestamp); - if (timestamp_interval <= 44100*10) { // i.e. timestamp was really after the reference timestamp + if (timestamp_interval <= conn->input_rate*10) { // i.e. timestamp was really after the reference timestamp timestamp_interval_time = (timestamp_interval * time_difference) / (frame_difference); // this is the nominal time, based on the