From 651013bfab2a8d45a8dd19211c82fbb1a486947b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 10 Feb 2020 16:54:55 +0100 Subject: [PATCH] Revert "buffers: set stride in buffer data chunks" This reverts commit b3c4eecea757f6fe723579a7da9370fc1ce7ed6e. The provider of the buffers should really set the fields in the chunk such as the offset, size and stride. --- src/pipewire/buffers.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/pipewire/buffers.c b/src/pipewire/buffers.c index aa51aa998..32b7f0ecc 100644 --- a/src/pipewire/buffers.c +++ b/src/pipewire/buffers.c @@ -60,7 +60,7 @@ static int alloc_buffers(struct pw_mempool *pool, { struct spa_buffer **buffers; void *skel, *data; - uint32_t i, j; + uint32_t i; uint32_t n_metas; struct spa_meta *metas; 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); 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;