mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
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.
This commit is contained in:
parent
707af43daa
commit
132814f114
1 changed files with 5 additions and 0 deletions
|
|
@ -332,6 +332,11 @@ static void teardown_stream(struct userdata *u) {
|
||||||
u->read_smoother = NULL;
|
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");
|
pa_log_debug("Audio stream torn down");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue