Revert "buffers: set stride in buffer data chunks"

This reverts commit b3c4eecea7.

The provider of the buffers should really set the fields in the
chunk such as the offset, size and stride.
This commit is contained in:
Wim Taymans 2020-02-10 16:54:55 +01:00
parent b3c4eecea7
commit 651013bfab

View file

@ -60,7 +60,7 @@ static int alloc_buffers(struct pw_mempool *pool,
{ {
struct spa_buffer **buffers; struct spa_buffer **buffers;
void *skel, *data; void *skel, *data;
uint32_t i, j; uint32_t i;
uint32_t n_metas; uint32_t n_metas;
struct spa_meta *metas; struct spa_meta *metas;
struct spa_data *datas; struct spa_data *datas;
@ -139,14 +139,6 @@ static int alloc_buffers(struct pw_mempool *pool,
pw_log_debug(NAME" %p: layout buffers skel:%p data:%p", allocation, skel, data); 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); 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->mem = m;
allocation->n_buffers = n_buffers; allocation->n_buffers = n_buffers;
allocation->buffers = buffers; allocation->buffers = buffers;