]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Make the wait time less than the packet interval time to enable SPS to catch up if...
authorMike Brady <mikebrady@eircom.net>
Mon, 7 Jan 2019 15:59:58 +0000 (15:59 +0000)
committerMike Brady <mikebrady@eircom.net>
Mon, 7 Jan 2019 15:59:58 +0000 (15:59 +0000)
player.c

index a085a636ff118c3eb946a74c03238dbdc2723e5b..3bab2428a3114bfc57b9d8416ae62be303072645 100644 (file)
--- 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;