mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
buffers: ensure buffer size does not exceed maxsize
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
This commit is contained in:
parent
bf0ff347c1
commit
7cc509b117
1 changed files with 1 additions and 0 deletions
|
|
@ -536,6 +536,7 @@ static GstBuffer *dequeue_buffer(GstPipeWireSrc *pwsrc)
|
|||
mem->offset = SPA_MIN(d->chunk->offset, d->maxsize);
|
||||
mem->size = SPA_MIN(d->chunk->size, d->maxsize - mem->offset);
|
||||
mem->offset += data->offset;
|
||||
spa_assert_se(mem->size <= mem->maxsize);
|
||||
if (d->chunk->flags & SPA_CHUNK_FLAG_CORRUPTED)
|
||||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_CORRUPTED);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue