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

Peter Meerwald pmeerw at pmeerw.net
Wed Dec 11 08:07:03 PST 2013


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)
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list