From 861c126b086fb72c8b7bb4c6552241054d8b74b3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 5 Jan 2016 19:37:08 +0100 Subject: [PATCH] ao_pulse: check for sample rate bounds pa_format_info_valid() does not do this. (Although there is a proposed patch on the PulseAudio mailing list.) See #2654. --- audio/out/ao_pulse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index 177f02e0a5..13813745f9 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -406,7 +406,7 @@ static bool set_format(struct ao *ao, pa_format_info *format) pa_format_info_set_channels(format, ao->channels.num); pa_format_info_set_channel_map(format, &map); - return pa_format_info_valid(format); + return ao->samplerate < PA_RATE_MAX && pa_format_info_valid(format); } static int init(struct ao *ao)