[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Thu Jan 24 06:01:32 PST 2013


 src/modules/bluetooth/module-bluetooth-device.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 132814f1148e6212cf594f918a1b91868425d387
Author: Mikel Astiz <mikel.astiz at bmw-carit.de>
Date:   Thu Jan 24 10:16:56 2013 +0100

    bluetooth: Fix potential assertion failure if MTU changes
    
    The assertion in hsp_process_render() assumes that, if a memory block is
    already set by the time the function is reached, its size matches
    write_block_size.
    
    This can however fail if a transport has been released and acquired
    back, in the unlikely case where the MTU has changed in the meantime,
    assuming the memory block wasn't released.

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index becf716..9e4a8f9 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -332,6 +332,11 @@ static void teardown_stream(struct userdata *u) {
         u->read_smoother = NULL;
     }
 
+    if (u->write_memchunk.memblock) {
+        pa_memblock_unref(u->write_memchunk.memblock);
+        pa_memchunk_reset(&u->write_memchunk);
+    }
+
     pa_log_debug("Audio stream torn down");
 }
 



More information about the pulseaudio-commits mailing list