diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-08 21:51:30 +0100 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2010-02-09 22:29:38 +0000 |
commit | 345547853bcb0825c0afb5b2528a8f1d5339a8ea (patch) | |
tree | e59a2032ac562f60d419a1095f9b19fb432d8f05 /src/modules/module-ladspa-sink.c | |
parent | 699233fb47d133f6ea1e36e8354a386c23608d5a (diff) |
core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
Diffstat (limited to 'src/modules/module-ladspa-sink.c')
-rw-r--r-- | src/modules/module-ladspa-sink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c index 994c778f..185871be 100644 --- a/src/modules/module-ladspa-sink.c +++ b/src/modules/module-ladspa-sink.c @@ -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; |