mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
buffer: fix header pointer after buffer realloc
This commit is contained in:
parent
50228dddf8
commit
e408c5a9a5
1 changed files with 1 additions and 0 deletions
|
|
@ -474,6 +474,7 @@ builder_ensure_size (struct stack_builder *sb, gsize size)
|
||||||
if (sb->buf.size + size > sb->buf.allocated_size) {
|
if (sb->buf.size + size > sb->buf.allocated_size) {
|
||||||
sb->buf.allocated_size = sb->buf.size + MAX (size, 1024);
|
sb->buf.allocated_size = sb->buf.size + MAX (size, 1024);
|
||||||
sb->buf.data = g_realloc (sb->buf.data, sb->buf.allocated_size);
|
sb->buf.data = g_realloc (sb->buf.data, sb->buf.allocated_size);
|
||||||
|
sb->sh = sb->buf.data;
|
||||||
}
|
}
|
||||||
return (guint8 *) sb->buf.data + sb->buf.size;
|
return (guint8 *) sb->buf.data + sb->buf.size;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue