mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-04 23:20:46 +00:00
pipewire: module-roc-{sink,source}: do not remove from argument property list
The property list is destroyed and not kept around, not passed to any other component, so this is unnecessary work.
This commit is contained in:
parent
68c0a13694
commit
b5e898ee83
|
@ -385,7 +385,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
|
||||
if ((str = pw_properties_get(props, "sink.name")) != NULL) {
|
||||
pw_properties_set(capture_props, PW_KEY_NODE_NAME, str);
|
||||
pw_properties_set(props, "sink.name", NULL);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "sink.props")) != NULL)
|
||||
|
@ -408,7 +407,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
|
||||
if ((str = pw_properties_get(props, "remote.ip")) != NULL) {
|
||||
data->remote_ip = strdup(str);
|
||||
pw_properties_set(props, "remote.ip", NULL);
|
||||
} else {
|
||||
pw_log_error("Remote IP not specified");
|
||||
res = -EINVAL;
|
||||
|
@ -417,14 +415,12 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
|
||||
if ((str = pw_properties_get(props, "remote.source.port")) != NULL) {
|
||||
data->remote_source_port = pw_properties_parse_int(str);
|
||||
pw_properties_set(props, "remote.source.port", NULL);
|
||||
} else {
|
||||
data->remote_source_port = PW_ROC_DEFAULT_SOURCE_PORT;
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "remote.repair.port")) != NULL) {
|
||||
data->remote_repair_port = pw_properties_parse_int(str);
|
||||
pw_properties_set(props, "remote.repair.port", NULL);
|
||||
} else {
|
||||
data->remote_repair_port = PW_ROC_DEFAULT_REPAIR_PORT;
|
||||
}
|
||||
|
@ -434,7 +430,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
data->fec_code = ROC_FEC_ENCODING_DEFAULT;
|
||||
}
|
||||
pw_log_info("using fec.code %s %d", str, data->fec_code);
|
||||
pw_properties_set(props, "fec.code", NULL);
|
||||
} else {
|
||||
data->fec_code = ROC_FEC_ENCODING_DEFAULT;
|
||||
}
|
||||
|
|
|
@ -410,7 +410,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
|
||||
if ((str = pw_properties_get(props, "source.name")) != NULL) {
|
||||
pw_properties_set(playback_props, PW_KEY_NODE_NAME, str);
|
||||
pw_properties_set(props, "source.name", NULL);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "source.props")) != NULL)
|
||||
|
@ -431,28 +430,24 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
|
||||
if ((str = pw_properties_get(props, "local.ip")) != NULL) {
|
||||
data->local_ip = strdup(str);
|
||||
pw_properties_set(props, "local.ip", NULL);
|
||||
} else {
|
||||
data->local_ip = strdup(PW_ROC_DEFAULT_IP);
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "local.source.port")) != NULL) {
|
||||
data->local_source_port = pw_properties_parse_int(str);
|
||||
pw_properties_set(props, "local.source.port", NULL);
|
||||
} else {
|
||||
data->local_source_port = PW_ROC_DEFAULT_SOURCE_PORT;
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "local.repair.port")) != NULL) {
|
||||
data->local_repair_port = pw_properties_parse_int(str);
|
||||
pw_properties_set(props, "local.repair.port", NULL);
|
||||
} else {
|
||||
data->local_repair_port = PW_ROC_DEFAULT_REPAIR_PORT;
|
||||
}
|
||||
|
||||
if ((str = pw_properties_get(props, "sess.latency.msec")) != NULL) {
|
||||
data->sess_latency_msec = pw_properties_parse_int(str);
|
||||
pw_properties_set(props, "sess.latency.msec", NULL);
|
||||
} else {
|
||||
data->sess_latency_msec = PW_ROC_DEFAULT_SESS_LATENCY;
|
||||
}
|
||||
|
@ -462,7 +457,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
pw_log_warn("Invalid resampler profile %s, using default", str);
|
||||
data->resampler_profile = ROC_RESAMPLER_PROFILE_DEFAULT;
|
||||
}
|
||||
pw_properties_set(props, "resampler.profile", NULL);
|
||||
} else {
|
||||
data->resampler_profile = ROC_RESAMPLER_PROFILE_DEFAULT;
|
||||
}
|
||||
|
@ -471,7 +465,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
|
|||
pw_log_error("Invalid fec code %s, using default", str);
|
||||
data->fec_code = ROC_FEC_ENCODING_DEFAULT;
|
||||
}
|
||||
pw_properties_set(props, "fec.code", NULL);
|
||||
} else {
|
||||
data->fec_code = ROC_FEC_ENCODING_DEFAULT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue