mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-20 08:56:47 -05:00
introduce sink input and source output limits
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@170 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
0205fc57bb
commit
50f592b67c
7 changed files with 20 additions and 8 deletions
|
|
@ -42,6 +42,11 @@ struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, con
|
|||
char st[256];
|
||||
assert(s && spec);
|
||||
|
||||
if (pa_idxset_ncontents(s->inputs) >= PA_MAX_INPUTS_PER_SINK) {
|
||||
fprintf(stderr, __FILE__": Failed to create sink input: too many inputs per sink.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!pa_sample_spec_equal(spec, &s->sample_spec))
|
||||
if (!(resampler = pa_resampler_new(spec, &s->sample_spec, s->core->memblock_stat)))
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue