[pulseaudio-discuss] [PATCH] modargs: Don't fail needlessly in pa_modargs_get_sample_spec_and_channel_map().

Tanu Kaskinen tanuk at iki.fi
Sun Dec 16 02:26:36 PST 2012


On Wed, 2012-05-09 at 06:04 +0300, Tanu Kaskinen wrote:
> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=49664
> ---
>  src/pulsecore/modargs.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
> index 555c4d0..e80b5d6 100644
> --- a/src/pulsecore/modargs.c
> +++ b/src/pulsecore/modargs.c
> @@ -425,8 +425,12 @@ int pa_modargs_get_sample_spec_and_channel_map(
>      if (pa_modargs_get_channel_map(ma, NULL, &map) < 0)
>          return -1;
>  
> -    if (map.channels != ss.channels)
> -        return -1;
> +    if (map.channels != ss.channels) {
> +        if (!pa_modargs_get_value(ma, "channels", NULL))
> +            ss.channels = map.channels;
> +        else
> +            return -1;
> +    }
>  
>      *rmap = map;
>      *rss = ss;

This is now applied.

-- 
Tanu



More information about the pulseaudio-discuss mailing list