diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-07-15 17:12:51 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-07-15 17:12:51 +0200 |
commit | 9b7d5c81e027f4af3682bd76866f0e364b1398f8 (patch) | |
tree | 2fdc4a6e57a28f751e8d9587cad74ee3c297a228 | |
parent | 1a6fe0e023406260165d6c39bb82b3db58f6794d (diff) |
module-adapter: only set MEDIA_CLASS when NULL
-rw-r--r-- | src/modules/module-adapter/adapter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/module-adapter/adapter.c b/src/modules/module-adapter/adapter.c index aa1f2384..f384126f 100644 --- a/src/modules/module-adapter/adapter.c +++ b/src/modules/module-adapter/adapter.c @@ -277,6 +277,8 @@ struct pw_node *pw_adapter_new(struct pw_core *core, return NULL; } + pw_properties_update(props, info->props); + if (info->n_output_ports == 0) direction = PW_DIRECTION_INPUT; else @@ -301,7 +303,8 @@ struct pw_node *pw_adapter_new(struct pw_core *core, pw_properties_setf(props, "audio.adapt.slave", "pointer:%p", slave->node); pw_properties_set(props, SPA_KEY_LIBRARY_NAME, "audioconvert/libspa-audioconvert"); - pw_properties_setf(props, PW_KEY_MEDIA_CLASS, "Audio/%s", + if (pw_properties_get(props, PW_KEY_MEDIA_CLASS) == NULL) + pw_properties_setf(props, PW_KEY_MEDIA_CLASS, "Audio/%s", direction == PW_DIRECTION_INPUT ? "Sink" : "Source"); node = pw_spa_node_load(core, NULL, NULL, |