Skip to content

Commit

Permalink
ao_pulse: check for sample rate bounds
Browse files Browse the repository at this point in the history
pa_format_info_valid() does not do this. (Although there is a proposed
patch on the PulseAudio mailing list.)

See #2654.
  • Loading branch information
wm4 committed Jan 5, 2016
1 parent 8fda724 commit 861c126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audio/out/ao_pulse.c
Expand Up @@ -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)
Expand Down

0 comments on commit 861c126

Please sign in to comment.