]> code.delx.au - pulseaudio/commit
ladspa-sink: Set a silence memchunk for the memblockq
authorBen Brewer <ben.brewer@codethink.co.uk>
Wed, 15 Jan 2014 11:19:46 +0000 (11:19 +0000)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Wed, 15 Jan 2014 11:50:11 +0000 (13:50 +0200)
commite96785c1c34706e902f28c25844f31d8201db2b2
treecf879574ccbaafbb153a716eaa0e1fa3d259b8b1
parentdbe66b0b5e6b6e24df45bda8bf656836f18e7f4b
ladspa-sink: Set a silence memchunk for the memblockq

A crash was observed that was caused by pa_memblockq_peek() returning
a NULL memblock in sink_input_pop_cb(). The scenario where this was
happening was

1. Delete 2 rtp-recv's connected to a ladspa-sink
2. Delete ladspa-sink
3. Delete alsa-sink
4. Create alsa-sink
5. Create ladspa-sink
6. Create 2 rtp-recv's connected to the ladspa-sink

The crash was probably caused by a rewind that made the read index go
negative while the write index was at least zero, causing there to be
a gap in the memblockq. The problematic rewind might have been caused
by adding the rtp-recv stream to the ladspa-sink. That has not been
proven, but this looks very similar to the bug that was fixed in
module-virtual-sink in commit 6bd34156b130c07b130de10111a12ef6dab18b52.
src/modules/module-ladspa-sink.c