Commit 926f8647 authored by David Edmundson's avatar David Edmundson Committed by Nate Graham
Browse files

[libtaskmanager] Increase buffer for pipewire format negotiation

Libtaskmanager's buffer for spa_builder  is too small on certain
configurations. Because podBuilder->state.offset is never reset, the
buffer space can run out when EGL returns a long list of dma_buf
modifiers, causing PipeWire negotiation to fail.

An example is when EGL returns 20 modifiers. There are 6 formats defined
in pipewiresourcestream.cpp, for each format it will construct 2 frames,
one with 21*8=168 bytes long of modifiers. The modifier lists for all
frames will be 6*168=1008 bytes (only 16 bytes left of 1024 bytes), let
alone other frames.

BUG: 446061
parent be964136
Pipeline #119800 passed with stage
in 7 minutes and 34 seconds
......@@ -260,7 +260,7 @@ bool PipeWireSourceStream::createStream(uint nodeid)
pwNodeId = nodeid;
pw_stream_add_listener(pwStream, &streamListener, &pwStreamEvents, this);
uint8_t buffer[1024];
uint8_t buffer[4096];
spa_pod_builder podBuilder = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
const QVector<spa_video_format> formats =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment