Bug 1841851 - WebRTC backport: PipeWire capturer: increase buffer size to avoid buffer overflow r=jib,webrtc-reviewers,mjf

This is a simple backport of an WebRTC upstream change.

Upstream commit: 8fcc6df79daf1810cd4ecdb8d2ef1d361abfdc9c

Differential Revision: https://phabricator.services.mozilla.com/D183355
This commit is contained in:
Jan Grulich 2023-07-27 09:49:21 +00:00
parent 7303f6f5b6
commit f7f26633d4
2 changed files with 4 additions and 3 deletions

View File

@ -281,7 +281,7 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged(
that->stream_size_ = DesktopSize(width, height);
uint8_t buffer[1024] = {};
uint8_t buffer[2048] = {};
auto builder = spa_pod_builder{buffer, sizeof(buffer)};
// Setup buffers and meta header for new format.
@ -364,7 +364,7 @@ void SharedScreenCastStreamPrivate::OnRenegotiateFormat(void* data, uint64_t) {
{
PipeWireThreadLoopLock thread_loop_lock(that->pw_main_loop_);
uint8_t buffer[2048] = {};
uint8_t buffer[4096] = {};
spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)};
@ -482,7 +482,7 @@ bool SharedScreenCastStreamPrivate::StartScreenCastStream(
pw_stream_add_listener(pw_stream_, &spa_stream_listener_,
&pw_stream_events_, this);
uint8_t buffer[2048] = {};
uint8_t buffer[4096] = {};
spa_pod_builder builder = spa_pod_builder{buffer, sizeof(buffer)};

View File

@ -0,0 +1 @@
We cherry-picked this in bug 1841851