diff --git a/src/daemon/main.c b/src/daemon/main.c index ef2a5fd17..8d465299c 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -171,7 +171,11 @@ static int parse_modules(struct data *d, const char *str) args = malloc(alen + 1); spa_json_parse_string(aval, alen, args); } else if (strcmp(arg, "flags") == 0) { - flags = strndup(aval, alen); + if (spa_json_is_container(aval, alen)) + alen = spa_json_container_len(&it[2], aval, alen); + + flags = malloc(alen + 1); + spa_json_parse_string(aval, alen, flags); } } } diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index aefa6ee87..c213e19e7 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -42,7 +42,7 @@ spa-libs = { modules = { ## = { [args = { = ... }] - # [flags = "[ifexists]|[nofail]"} + # [flags = [ [ifexists] [nofail] ]} # # Loads a module with the given parameters. # If ifexists is given, the module is ignoed when it is not found. @@ -57,7 +57,7 @@ modules = { #rt.time.soft = 200000 #rt.time.hard = 200000 } - flags = "ifexists|nofail" + flags = [ ifexists nofail ] } # The native communication protocol @@ -129,13 +129,13 @@ modules = { objects = { ## = { [args = { = ... } ] - # [flags = "nofail"] } + # [flags = [ [nofail] ] } # # Creates an object from a PipeWire factory with the given parameters. # If nofail is given, errors are ignored (and no object is created) # #spa-node-factory = { args = "factory.name=videotestsrc node.name=videotestsrc Spa:Pod:Object:Param:Props:patternType=1" } - #spa-device-factory = { args = "factory.name=api.jack.device foo=bar" flags = nofail } + #spa-device-factory = { args = "factory.name=api.jack.device foo=bar" flags = [ nofail ] } #spa-device-factory = { args = "factory.name=api.alsa.enum.udev" } #spa-device-factory = { args = "factory.name=api.alsa.seq.bridge node.name=Internal-MIDI-Bridge" } #adapter = { args = "factory.name=audiotestsrc node.name=my-test" }