mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
don't allow excessively high sample rates
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1449 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
cf925b10e1
commit
4a05bc9bdc
2 changed files with 4 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ int pa_sample_spec_valid(const pa_sample_spec *spec) {
|
|||
assert(spec);
|
||||
|
||||
if (spec->rate <= 0 ||
|
||||
spec->rate > PA_RATE_MAX ||
|
||||
spec->channels <= 0 ||
|
||||
spec->channels > PA_CHANNELS_MAX ||
|
||||
spec->format >= PA_SAMPLE_MAX ||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,9 @@ PA_C_DECL_BEGIN
|
|||
/** Maximum number of allowed channels */
|
||||
#define PA_CHANNELS_MAX 32
|
||||
|
||||
/** Maximum allowed sample rate */
|
||||
#define PA_RATE_MAX (48000*4)
|
||||
|
||||
/** Sample format */
|
||||
typedef enum pa_sample_format {
|
||||
PA_SAMPLE_U8, /**< Unsigned 8 Bit PCM */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue