mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-rtp: fix loading of source
This commit is contained in:
parent
be09198249
commit
9e67d6781d
1 changed files with 5 additions and 5 deletions
|
|
@ -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, " }");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue