Bug 1397793 - Share SharedBuffer accross SourceMediaStream. r=pehrsons
authorPaul Adenot <paul@paul.cx>
Tue, 28 Nov 2017 18:43:11 +0100
changeset 396343 cece0d078ad295d8dd865bf08f90c652b1e5d2d9
parent 396342 43b35e28df74c3b5a4236042b51b5abd47860cde
child 396344 4c09f494655fcd68e6a30a35ad2f014d0cab0abe
push id56975
push userdluca@mozilla.com
push dateThu, 14 Dec 2017 09:59:07 +0000
treeherderautoland@16bcfaad13e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1397793
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1397793 - Share SharedBuffer accross SourceMediaStream. r=pehrsons MozReview-Commit-ID: 4PEjwiA6PR8
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -899,17 +899,18 @@ MediaEngineWebRTCMicrophoneSource::Packe
     for (size_t i = 0; i < mSources.Length(); ++i) {
       if (!mSources[i]) { // why ?!
         continue;
       }
 
       // We already have planar audio data of the right format. Insert into the
       // MSG.
       MOZ_ASSERT(processedOutputChannelPointers.Length() == aChannels);
-      segment.AppendFrames(buffer.forget(),
+      RefPtr<SharedBuffer> other = buffer;
+      segment.AppendFrames(other.forget(),
                            processedOutputChannelPointersConst,
                            mPacketizer->PacketSize(),
                            mPrincipalHandles[i]);
       mSources[i]->AppendToTrack(mTrackID, &segment);
     }
   }
 }