From b585f4301aebd6cf1bf1d6b2ff272c1ab7284304 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 28 Nov 2017 18:43:11 +0100 Subject: [PATCH] Bug 1397793 - Share SharedBuffer accross SourceMediaStream. r=pehrsons MozReview-Commit-ID: 4PEjwiA6PR8 --HG-- extra : rebase_source : 265d30d8bf83103c50bb3cb84b263bdb87b8494e extra : histedit_source : 1ba9523a366310d5784a671e2be03a7a71e790b3 --- dom/media/webrtc/MediaEngineWebRTCAudio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp index 01eda416779e..919d90c1d52b 100644 --- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp +++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp @@ -904,7 +904,8 @@ MediaEngineWebRTCMicrophoneSource::PacketizeAndProcess(MediaStreamGraph* aGraph, // We already have planar audio data of the right format. Insert into the // MSG. MOZ_ASSERT(processedOutputChannelPointers.Length() == aChannels); - segment.AppendFrames(buffer.forget(), + RefPtr other = buffer; + segment.AppendFrames(other.forget(), processedOutputChannelPointersConst, mPacketizer->PacketSize(), mPrincipalHandles[i]);