]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Bugfix -- don't try to create the metadata pipe or output metadata to it when metadat...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 5 Dec 2020 18:00:47 +0000 (18:00 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 5 Dec 2020 18:00:47 +0000 (18:00 +0000)
rtsp.c
shairport.c

diff --git a/rtsp.c b/rtsp.c
index abfabc4fb6ed9b4da9458f1814bb954303fc660f..184b411e0b57e5c1966d12d6d8289b1dc97eff5c 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -1793,7 +1793,8 @@ int send_metadata_to_queue(pc_queue *queue, uint32_t type, uint32_t code, char *
 int send_metadata(uint32_t type, uint32_t code, char *data, uint32_t length, rtsp_message *carrier,
                   int block) {
   int rc;
-  rc = send_metadata_to_queue(&metadata_queue, type, code, data, length, carrier, block);
+  if (config.metadata_enabled)
+       rc = send_metadata_to_queue(&metadata_queue, type, code, data, length, carrier, block);
 
 #ifdef CONFIG_METADATA_HUB
   rc = send_metadata_to_queue(&metadata_hub_queue, type, code, data, length, carrier, block);
index ba99523330b72fa32517ce386544fc0b738fc994..9cedc72db95e963e9f6c2a391a613155e57617ba 100644 (file)
@@ -1362,7 +1362,8 @@ void exit_function() {
 #endif
 
 #ifdef CONFIG_METADATA
-      metadata_stop(); // close down the metadata pipe
+                       if (config.metadata_enabled)
+       metadata_stop(); // close down the metadata pipe
 #endif
 
       activity_monitor_stop(0);
@@ -1952,7 +1953,8 @@ int main(int argc, char **argv) {
 #endif
   memcpy(config.hw_addr, ap_md5, sizeof(config.hw_addr));
 #ifdef CONFIG_METADATA
-  metadata_init(); // create the metadata pipe if necessary
+       if (config.metadata_enabled)
+       metadata_init(); // create the metadata pipe if necessary
 #endif
 
 #ifdef CONFIG_METADATA_HUB