mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
buffers: set stride in buffer data chunks
v2 clients expect the stride to be set, even when the sender doesn't set it.
This commit is contained in:
parent
56c15ca9e8
commit
b3c4eecea7
1 changed files with 9 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ static int alloc_buffers(struct pw_mempool *pool,
|
|||
{
|
||||
struct spa_buffer **buffers;
|
||||
void *skel, *data;
|
||||
uint32_t i;
|
||||
uint32_t i, j;
|
||||
uint32_t n_metas;
|
||||
struct spa_meta *metas;
|
||||
struct spa_data *datas;
|
||||
|
|
@ -139,6 +139,14 @@ static int alloc_buffers(struct pw_mempool *pool,
|
|||
pw_log_debug(NAME" %p: layout buffers skel:%p data:%p", allocation, skel, data);
|
||||
spa_buffer_alloc_layout_array(&info, n_buffers, buffers, skel, data);
|
||||
|
||||
/* v2 compat, they expect the stride to be set */
|
||||
for (i = 0; i < n_buffers; i++) {
|
||||
for (j = 0; j < n_datas; j++) {
|
||||
struct spa_data *d = &buffers[i]->datas[j];
|
||||
d->chunk->stride = data_strides[0];
|
||||
}
|
||||
}
|
||||
|
||||
allocation->mem = m;
|
||||
allocation->n_buffers = n_buffers;
|
||||
allocation->buffers = buffers;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue