gstpipewiresrc: Do not alter meta plane count

Shared memory buffers may contain multiple planes.
Thus we need to keep the meta plane number as derived from the format.

Closes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3045
This commit is contained in:
Robert Mader 2023-02-20 22:25:05 +01:00 committed by Wim Taymans
parent 23b86761a5
commit 0b69f37a7c

View file

@ -626,8 +626,7 @@ static GstBuffer *dequeue_buffer(GstPipeWireSrc *pwsrc)
info->offset, info->offset,
info->stride); info->stride);
meta->n_planes = MIN(meta->n_planes, b->buffer->n_datas); for (i = 0; i < MIN (b->buffer->n_datas, GST_VIDEO_MAX_PLANES); i++) {
for (i = 0; i < meta->n_planes; i++) {
struct spa_data *d = &b->buffer->datas[i]; struct spa_data *d = &b->buffer->datas[i];
meta->offset[i] = video_size; meta->offset[i] = video_size;
meta->stride[i] = d->chunk->stride; meta->stride[i] = d->chunk->stride;