[pulseaudio-discuss] [PATCH 3/3] module-device-manager: Refine logic to ignore filtered streams

Tanu Kaskinen tanuk at iki.fi
Fri May 6 12:50:59 UTC 2016


On Fri, 2016-05-06 at 13:43 +0530, arun at accosted.net wrote:
> @@ -664,9 +665,9 @@ static void route_sink_input(struct userdata *u, pa_sink_input *si) {
>      if (!si->sink)
>          return;
>  
> -    ignore = pa_proplist_gets(si->proplist, "module-device-manager.ignore");
> -    if (ignore && pa_parse_boolean(ignore))
> -        return;
> +    auto_filtered_prop = pa_proplist_gets(si->proplist, "module-device-manager.auto_filtered");
> +    if (auto_filtered_prop)
> +        auto_filtered = pa_parse_boolean(auto_filtered_prop);

You'd probably change this anyway after fixing the previous patch, but
I'll mentioin this just in case: we should check if pa_parse_boolean()
fails and treat that as if the property was not set at all.

> -#define PA_PROP_MDM_IGNORE          "module-device-manager.ignore"
> +#define PA_PROP_MDM_IGNORE          "module-device-manager.auto_filtered"

The constant name should be updated too.

-- 
Tanu


More information about the pulseaudio-discuss mailing list