mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
This commit is contained in:
parent
699233fb47
commit
345547853b
6 changed files with 24 additions and 6 deletions
|
|
@ -890,7 +890,7 @@ static struct output *output_new(struct userdata *u, pa_sink *sink) {
|
|||
1,
|
||||
0,
|
||||
0,
|
||||
NULL);
|
||||
&u->sink->silence);
|
||||
|
||||
pa_assert_se(pa_idxset_put(u->outputs, o, NULL) == 0);
|
||||
update_description(u);
|
||||
|
|
|
|||
|
|
@ -476,6 +476,7 @@ int pa__init(pa_module*m) {
|
|||
unsigned long input_port, output_port, p, j, n_control;
|
||||
unsigned c;
|
||||
pa_bool_t *use_default = NULL;
|
||||
pa_memchunk silence;
|
||||
|
||||
pa_assert(m);
|
||||
|
||||
|
|
@ -514,7 +515,10 @@ int pa__init(pa_module*m) {
|
|||
u = pa_xnew0(struct userdata, 1);
|
||||
u->module = m;
|
||||
m->userdata = u;
|
||||
u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
|
||||
|
||||
pa_silence_memchunk_get(&m->core->silence_cache, m->core->mempool, &silence, &ss, 0);
|
||||
u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, &silence);
|
||||
pa_memblock_unref(silence.memblock);
|
||||
|
||||
if (!(e = getenv("LADSPA_PATH")))
|
||||
e = LADSPA_PATH;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue