From: Mike Brady Date: Mon, 7 Jan 2019 15:59:58 +0000 (+0000) Subject: Make the wait time less than the packet interval time to enable SPS to catch up if... X-Git-Tag: 3.3RC0~66^2~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67a19bf3c9e0a54515138f1bfeb7205bcf5378d5;p=thirdparty%2Fshairport-sync.git Make the wait time less than the packet interval time to enable SPS to catch up if it gets behind. --- diff --git a/player.c b/player.c index a085a636..3bab2428 100644 --- a/player.c +++ b/player.c @@ -1198,8 +1198,8 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) { if (wait) { uint64_t time_to_wait_for_wakeup_fp = ((uint64_t)1 << 32) / conn->input_rate; // this is time period of one frame - time_to_wait_for_wakeup_fp *= 4 * 352; // four full 352-frame packets - time_to_wait_for_wakeup_fp /= 3; // four thirds of a packet time + time_to_wait_for_wakeup_fp *= 2 * 352; // two full 352-frame packets + time_to_wait_for_wakeup_fp /= 3; // two thirds of a packet time #ifdef COMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD uint64_t time_of_wakeup_fp = local_time_now + time_to_wait_for_wakeup_fp;