]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
btr: Introduce btr_add_output_dont_free().
authorAndre Noll <maan@systemlinux.org>
Tue, 23 Aug 2011 19:04:02 +0000 (21:04 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 8 Jul 2012 17:06:39 +0000 (17:06 +0000)
At the moment, all buffers which are fed to a buffer tree must be
allocated on the heap since the buffer tree code automatically frees
the buffer once its refcount dropped to zero.

The new afh receiver, however, mmaps the audio file and likes to feed
chunks of this memory map into the buffer tree. This is currently
impossible because such buffers must not be freed.

This patch adds the new public function btr_add_output_dont_free()
which works like btr_add_output() but sets the new dont_free bit
which prevents the buffer from being deallocated.

Also btr_inplace_ok() is changed to return "false" whenever there
exists a buffer in the input queue with the dont_free bit set.


No differences found