]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add a new call to the backends -- prepare_to_play() -- to give them advance warning...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 8 Aug 2024 15:09:26 +0000 (16:09 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 8 Aug 2024 15:09:26 +0000 (16:09 +0100)
player.c

index 11b0c5385c13b0f9ddde83402a211f0f6c85a624..102085a4002cafd5f59dbfcb74fdbab5ba273da5 100644 (file)
--- a/player.c
+++ b/player.c
@@ -1179,6 +1179,10 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
           if (conn->ab_buffering) {  // if we are getting packets but not yet forwarding them to the
                                      // player
             if (conn->first_packet_timestamp == 0) { // if this is the very first packet
+            
+              if (config.output->prepare_to_play) // tell the player to get ready
+                config.output->prepare_to_play(); // there could be more than one of these sent
+                
               conn->first_packet_timestamp =
                   curframe->given_timestamp; // we will keep buffering until we are
                                              // supposed to start playing this