]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Hack alert. If a very large number of frames to flush is calculate -- shome mhistake...
authorMike Brady <mikebrady@eircom.net>
Wed, 9 May 2018 16:15:28 +0000 (17:15 +0100)
committerMike Brady <mikebrady@eircom.net>
Wed, 9 May 2018 16:15:28 +0000 (17:15 +0100)
player.c

index 70d6f7a992aeac8b69c61f1f76855e9e93f8c3de..b5fbbc4e939f9dca0355c2ace6b1011e801816a8 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1725,8 +1725,10 @@ static void *player_thread_func(void *arg) {
             free(silence);
           }
         } else if (frames_to_drop) {
-          if (frames_to_drop > 3 * config.output_rate)
-            warn("Very large number of frames to drop: %" PRId64 ".", frames_to_drop);
+          if (frames_to_drop > 3 * config.output_rate) {
+            warn("Shome mhistake shurely: very large number of frames to drop: %" PRId64 " -- setting it to %" PRId64 ".", frames_to_drop,3 * config.output_rate);
+            frames_to_drop = 3 * config.output_rate;
+          }
           debug(3, "%" PRId64 " frames to drop.", frames_to_drop);
           frames_to_drop -= inframe->length;
           if (frames_to_drop < 0)