diff --git a/rtsp.c b/rtsp.c index abfabc4f..184b411e 100644 --- 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); diff --git a/shairport.c b/shairport.c index ba995233..9cedc72d 100644 --- a/shairport.c +++ b/shairport.c @@ -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