[pulseaudio-discuss] [PATCH 1/2] modargs: Fix pa_modargs_get_sample_rate() if no "rate" is present in the modargs

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Dec 13 03:49:37 PST 2013


On Wed, 2013-12-11 at 17:07 +0100, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
> 
> see http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-December/019471.html
> 
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> Reported-by: "poljar (Damir Jelić)" <poljarinho at gmail.com>
> ---
>  src/pulsecore/modargs.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
> index 432e480..6855b6a 100644
> --- a/src/pulsecore/modargs.c
> +++ b/src/pulsecore/modargs.c
> @@ -369,6 +369,7 @@ int pa_modargs_get_sample_rate(pa_modargs *ma, uint32_t *rate) {
>  
>      pa_assert(rate);
>  
> +    rate_local = *rate;
>      if ((pa_modargs_get_value_u32(ma, "rate", &rate_local)) < 0 ||
>          rate_local <= 0 ||
>          rate_local > PA_RATE_MAX)

Thanks Peter and poljar, I pushed both of these patches.

-- 
Tanu



More information about the pulseaudio-discuss mailing list