From: Mike Brady Date: Tue, 25 Feb 2020 14:44:13 +0000 (+0000) Subject: Fix calculation of initial delay X-Git-Tag: 3.3.7d12~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd6d8d45f58b12818f1ba048898c840f40322ce;p=thirdparty%2Fshairport-sync.git Fix calculation of initial delay --- diff --git a/player.c b/player.c index 0e2a9956..483fbee8 100644 --- a/player.c +++ b/player.c @@ -1137,8 +1137,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) { resp = config.output->delay(&dac_delay); if (resp == 0) { int64_t gross_frame_gap = - ((conn->first_packet_time_to_play - local_time_now) * config.output_rate) >> - 32; + ((conn->first_packet_time_to_play - local_time_now) * config.output_rate) / 1000000000; int64_t exact_frame_gap = gross_frame_gap - dac_delay; // debug(1,"Exact and gross frame gaps are %" PRId64 " and %" PRId64 " frames, // and the dac delay is %ld.", exact_frame_gap, gross_frame_gap, dac_delay);