]> git.tuebingen.mpg.de Git - paraslash.git/commit
libao: Avoid segfault on com_cycle.
authorAndre Noll <maan@systemlinux.org>
Thu, 3 Feb 2011 16:15:27 +0000 (17:15 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 6 May 2011 20:12:06 +0000 (22:12 +0200)
commitcf66f48eb13a66f1d89d612be3ad8f950ece5816
treee8443d0aec64d936ef175d5bdf4463bf7e9f2f6e
parenta24d175e6d093d6d9f6e583c3026e45924bad621
libao: Avoid segfault on com_cycle.

Executing the cycle command while the ao writer is active can lead to
a segmentation fault because kill_all_decoders() removes the buffer
tree node of the ao writer but leaves its child node alive.

This patch changes kill_all_decoders() to kill the receiver node only
while leaving all other nodes alone, removing the assumption that
the set of filter nodes and writer nodes are the only nodes in the
buffer tree. This assumption used to be true but became false with
the merge of the ao writer which has two buffer tree nodes.

It is enough to kill only the receiver node as all other nodes will
eventually notice that their parent node no longer exists and exit
shortly thereafter.
audiod.c