From 67f422fb9d83ab58c061c77626afe981fb2d3abc Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:09:26 +0100 Subject: [PATCH] Add a new call to the backends -- prepare_to_play() -- to give them advance warning that audio will be coming soon. Sent when the first frame is received. --- player.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/player.c b/player.c index 11b0c538..102085a4 100644 --- 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 -- 2.47.3