mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
8fda7247ff
commit
861c126b08
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue