tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b6938aa4847b44ca174ad510933208967096aef5
parent 6d4fb372d04c6c8a916e3ff0b847b0c8960e3c31
Author: Andreas Pehrson <apehrson@mozilla.com>
Date:   Tue,  9 Dec 2025 16:19:27 +0000

Bug 2004850 - Clear WebRTC GMP encoder input image map on Release (from libwebrtc) and termination (from IPC). r=bwc

This covers some corner cases, for instance when libwebrtc releases the encoder
with a frame in flight, then re-uses it.

Differential Revision: https://phabricator.services.mozilla.com/D275605

Diffstat:
Mdom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp b/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp @@ -257,6 +257,7 @@ void WebrtcGmpVideoEncoder::Close_g() { mGMP = nullptr; mHost = nullptr; mInitting = false; + mInputImageMap.Clear(); if (mCachedPluginId) { mReleasePluginEvent.Notify(*mCachedPluginId); @@ -539,6 +540,7 @@ void WebrtcGmpVideoEncoder::Terminated() { mGMP = nullptr; mHost = nullptr; mInitting = false; + mInputImageMap.Clear(); if (gmp) { // Do this last, since this could cause us to be destroyed