From 9e67d6781d4939af1d05a853efe05be421cf0ef7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 26 Feb 2023 18:30:22 +0100 Subject: [PATCH] module-rtp: fix loading of source --- src/modules/module-rtp-sap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/module-rtp-sap.c b/src/modules/module-rtp-sap.c index f6d73c729..f36891bee 100644 --- a/src/modules/module-rtp-sap.c +++ b/src/modules/module-rtp-sap.c @@ -725,13 +725,14 @@ static int session_load_source(struct session *session, struct pw_properties *pr pw_log_error("Can't open memstream: %m"); return -errno; } + fprintf(f, "{"); if ((str = pw_properties_get(props, "rtp.destination.ip")) != NULL) - pw_properties_set(props, "source.ip", str); + fprintf(f, "\"source.ip\" = \"%s\", ", str); if ((str = pw_properties_get(props, "rtp.destination.port")) != NULL) - pw_properties_set(props, "source.port", str); + fprintf(f, "\"source.port\" = %s, ", str); if ((str = pw_properties_get(props, "rtp.session")) != NULL) - pw_properties_set(props, "sess.name", str); + fprintf(f, "\"sess.name\" = \"%s\", ", str); if ((media = pw_properties_get(props, "rtp.media")) == NULL) media = "audio"; @@ -749,7 +750,7 @@ static int session_load_source(struct session *session, struct pw_properties *pr pw_log_error("unknown rtp.mime type %s", mime); return -EINVAL; } - pw_properties_set(props, "rtp.media", format_info->media_type); + fprintf(f, "\"rtp.media\" = \"%s\", ", format_info->media_type); if (format_info->format_str != NULL) { pw_properties_set(props, "audio.format", format_info->format_str); if ((str = pw_properties_get(props, "rtp.rate")) != NULL) @@ -764,7 +765,6 @@ static int session_load_source(struct session *session, struct pw_properties *pr if ((str = pw_properties_get(props, "rtp.ts-offset")) != NULL) pw_properties_set(props, "sess.ts-offset", str); - fprintf(f, "{"); fprintf(f, " stream.props = {"); pw_properties_serialize_dict(f, &props->dict, 0); fprintf(f, " }");