]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Remove check for AAC decoder.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 24 May 2022 09:17:01 +0000 (10:17 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 24 May 2022 09:17:01 +0000 (10:17 +0100)
player.c
rtp.c

index 0eb6b2dfa885bd8df358956be6cc75595bcd1b52..1c6e1c96ff37297b46a57d272a505051e6d0b07f 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1310,7 +1310,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
         die("input_rate is zero -- should never happen!");
       uint64_t time_to_wait_for_wakeup_ns =
           1000000000 / conn->input_rate;     // this is time period of one frame
-      time_to_wait_for_wakeup_ns *= 2 * 352; // two full 352-frame packets
+      time_to_wait_for_wakeup_ns *= 12 * 352; // two full 352-frame packets
       time_to_wait_for_wakeup_ns /= 3;       // two thirds of a packet time
 
 #ifdef COMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD
diff --git a/rtp.c b/rtp.c
index 486e2b59ef8c8c31a65c9b7982eb3cf60175c3dc..0e2893c13c0901306117b42f929a7c997e163643 100644 (file)
--- a/rtp.c
+++ b/rtp.c
@@ -2235,7 +2235,7 @@ void *rtp_buffered_audio_processor(void *arg) {
   }
   // push a closer -- av_parser_close(codec_parser_context);
   pthread_cleanup_push(av_parser_init_cleanup_handler, codec_parser_context);
-  
+
   if (codec_context->sample_fmt != AV_SAMPLE_FMT_FLTP)
     die("the AAC decoder is not capable of handling Floating Point Planar (\"fltp\") formatted AAC-encoded material.");
 
@@ -2455,7 +2455,7 @@ void *rtp_buffered_audio_processor(void *arg) {
                                      352)) { // must be greater than the lead time.
         // if there is enough stuff in the player's buffer, sleep for a while and try again
         debug(3, "sleep while full");
-        usleep(10000); // wait for a while
+        usleep(20000); // wait for a while
       } else {
         if ((pcm_buffer_occupancy - pcm_buffer_read_point) >= (352 * conn->input_bytes_per_frame)) {
           new_buffer_needed = 0;
@@ -2530,7 +2530,7 @@ void *rtp_buffered_audio_processor(void *arg) {
             }
           } else {
             debug(3, "sleep until demand");
-            usleep(10000); // wait before asking if play is enabled again
+            usleep(20000); // wait before asking if play is enabled again
           }
         } else {
           new_buffer_needed = 1;