LADI
/
spa
1
Fork 0

module-rtp: set default sess.media in properties

Set a default sess.media in properties because we will use it later.
This commit is contained in:
Wim Taymans 2023-05-15 12:23:28 +02:00
parent fb5c9688a2
commit d3896d290e
1 changed files with 3 additions and 4 deletions

View File

@ -1710,6 +1710,9 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
impl->loop = pw_context_get_main_loop(context);
impl->data_loop = pw_data_loop_get_loop(pw_context_get_data_loop(context));
if (pw_properties_get(props, "sess.media") == NULL)
pw_properties_set(props, "sess.media", "midi");
if ((str = pw_properties_get(props, "stream.props")) != NULL)
pw_properties_update_string(stream_props, str, strlen(str));
@ -1735,10 +1738,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
impl->ttl = pw_properties_get_uint32(props, "net.ttl", DEFAULT_TTL);
impl->mcast_loop = pw_properties_get_bool(props, "net.loop", DEFAULT_LOOP);
if ((str = pw_properties_get(stream_props, "sess.media")) == NULL) {
str = "midi";
pw_properties_set(stream_props, "sess.media", str);
}
if (spa_streq(str, "audio")) {
struct spa_dict_item items[] = {
{ "audio.format", DEFAULT_FORMAT },