]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
When a buffered stream is paused or stopped, try to close the output device immediate...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 5 Oct 2022 11:41:54 +0000 (12:41 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Wed, 5 Oct 2022 11:41:54 +0000 (12:41 +0100)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index 76395df9f03b48a4dc39306dfa0d7e592464ad6d..81cd1b3f4f275e111a72495669ce837daaaa230e 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -2003,6 +2003,10 @@ void handle_setrateanchori(rtsp_conn_info *conn, rtsp_message *req, rtsp_message
         activity_monitor_signify_activity(0);
         conn->ap2_play_enabled = 0;
         reset_anchor_info(conn);
+        if (config.output->stop) {
+          debug(2, "Connection %d: Stop the output backend.", conn->connection_number);
+          config.output->stop();
+        }
       }
       pthread_cleanup_pop(1); // unlock the conn->flush_mutex
     }