Fix a crash that occurred if metadata support is enabled during compilation but turned off in the configuration file.

Fix a crash that occurred playing from AirPower on Android.
This commit is contained in:
Mike Brady
2020-12-23 16:11:12 +00:00
parent d7150a0aca
commit c27fb1c9b5
2 changed files with 57 additions and 46 deletions
+7 -3
View File
@@ -445,9 +445,13 @@ void set_dacp_server_information(rtsp_conn_info *conn) {
}
if (dacp_server.active_remote_id)
free(dacp_server.active_remote_id);
dacp_server.active_remote_id =
strdup(conn->dacp_active_remote); // even if the dacp_id remains the same,
// the active remote will change.
if (conn->dacp_active_remote)
dacp_server.active_remote_id =
strdup(conn->dacp_active_remote); // even if the dacp_id remains the same,
// the active remote will change.
else
dacp_server.active_remote_id = NULL;
debug(3, "set_dacp_server_information set active-remote id to %s.", dacp_server.active_remote_id);
pthread_cond_signal(&dacp_server_information_cv);
debug_mutex_unlock(&dacp_server_information_lock, 3);