mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -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
|
|
@ -47,12 +47,16 @@ int pa_play_memchunk(
|
|||
|
||||
pa_memblockq *q;
|
||||
int r;
|
||||
pa_memchunk silence;
|
||||
|
||||
pa_assert(sink);
|
||||
pa_assert(ss);
|
||||
pa_assert(chunk);
|
||||
|
||||
q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, NULL);
|
||||
pa_silence_memchunk_get(&sink->core->silence_cache, sink->core->mempool, &silence, ss, 0);
|
||||
q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, &silence);
|
||||
pa_memblock_unref(silence.memblock);
|
||||
|
||||
pa_assert_se(pa_memblockq_push(q, chunk) >= 0);
|
||||
|
||||
if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, sink_input_index)) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue