mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-04 06:46:24 -04:00
pulse-server: keep allocate buffer size around
For playback and capture streams we allocate MAXLENGTH (4M) buffers but for upload streams we must allow space for the total upload stream, which can be up to the max allowed sample size (16M). Keep the allocated size for the stream around in a variable so that we can use it when writing/reading to/from the ringbuffer. This could later also be extended to use the attr.maxlength variable to size the buffer (but it's usually 4M anyway). This is more complicated because we need to grow the buffer size when new attributes are set, which is probably more complicated than useful.
This commit is contained in:
parent
32648b7cc7
commit
b7aae374bf
5 changed files with 23 additions and 21 deletions
|
|
@ -163,8 +163,7 @@ void stream_free(struct stream *stream)
|
|||
|
||||
pw_work_queue_cancel(impl->work_queue, stream, SPA_ID_INVALID);
|
||||
|
||||
if (stream->buffer)
|
||||
free(stream->buffer);
|
||||
free(stream->buffer);
|
||||
|
||||
pw_properties_free(stream->props);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue