From afb4a2f49c601de0b7b93611d0f0beb6fac7fe78 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 26 Mar 2025 17:54:37 +0100 Subject: [PATCH] Revert "gst: src: Minor fix for offsets" This reverts commit 4c200183b97a7a97e6dfbdc55eacd36dc382986a. The offset is already applied when we share/copy the memory in the target buffer. --- src/gst/gstpipewiresrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gst/gstpipewiresrc.c b/src/gst/gstpipewiresrc.c index 963c6863f..01f73c9c7 100644 --- a/src/gst/gstpipewiresrc.c +++ b/src/gst/gstpipewiresrc.c @@ -676,7 +676,9 @@ static GstBuffer *dequeue_buffer(GstPipeWireSrc *pwsrc) for (i = 0; i < MIN (n_datas, n_planes); i++) { struct spa_data *d = &b->buffer->datas[i]; - meta->offset[i] = d->chunk->offset + video_size; + /* don't add the chunk offset here, this is done below when we + * share/copy the memory in the target buffer below */ + meta->offset[i] = video_size; meta->stride[i] = d->chunk->stride; video_size += d->chunk->size;