Bug 1328142 - fix bug in VideoConduit::SetRemoteSSRC handling r=jesup
authorPaul Kerr [:pkerr] <pkerr@mozilla.com>
Thu, 05 Jan 2017 18:15:07 -0800
changeset 377349 2233e03ef6fcee477e6436f932d7464dff161054
parent 377348 4ea7585240cfbecfa047fb578ba04478f2f19e1f
child 377350 05018a650beebbc9dff35616350b673bfc46cdfd
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1328142
milestone53.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 1328142 - fix bug in VideoConduit::SetRemoteSSRC handling r=jesup
media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
media/webrtc/signaling/src/media-conduit/VideoConduit.h
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -1109,18 +1109,18 @@ WebrtcVideoConduit::ConfigureRecvMediaCo
   // Now decide if we need to recreate the receive stream, or can keep it
   if (!mRecvStream ||
       CodecsDifferent(recv_codecs, mRecvCodecList) ||
       mRecvStreamConfig.rtp.nack.rtp_history_ms != (use_nack_basic ? 1000 : 0) ||
       mRecvStreamConfig.rtp.remb != use_remb ||
       mRecvStreamConfig.rtp.tmmbr != use_tmmbr ||
       mRecvStreamConfig.rtp.keyframe_method != kf_request_method ||
       (use_fec &&
-       mRecvStreamConfig.rtp.fec.ulpfec_payload_type != ulpfec_payload_type ||
-       mRecvStreamConfig.rtp.fec.red_payload_type != red_payload_type)) {
+       (mRecvStreamConfig.rtp.fec.ulpfec_payload_type != ulpfec_payload_type ||
+        mRecvStreamConfig.rtp.fec.red_payload_type != red_payload_type))) {
 
     condError = StopReceiving();
     if (condError != kMediaConduitNoError) {
       return condError;
     }
 
     // If we fail after here things get ugly
     mRecvStreamConfig.rtp.rtcp_mode = webrtc::RtcpMode::kCompound;
@@ -1144,18 +1144,17 @@ WebrtcVideoConduit::ConfigureRecvMediaCo
     auto ssrc = mRecvStreamConfig.rtp.remote_ssrc;
     do {
       SECStatus rv = PK11_GenerateRandom(reinterpret_cast<unsigned char*>(&ssrc), sizeof(ssrc));
       if (rv != SECSuccess) {
         return kMediaConduitUnknownError;
       }
     } while (ssrc == mRecvStreamConfig.rtp.remote_ssrc);
 
-    //DEBUG(pkerr)  mRecvStreamConfig.rtp.local_ssrc = ssrc;
-    mRecvStreamConfig.rtp.local_ssrc = 1;
+    mRecvStreamConfig.rtp.local_ssrc = ssrc;
 
     // XXX Copy over those that are the same and don't rebuild them
     mRecvCodecList.SwapElements(recv_codecs);
     recv_codecs.Clear();
     mRecvStreamConfig.rtp.rtx.clear();
     // Rebuilds mRecvStream from mRecvStreamConfig
     DeleteRecvStream();
     MediaConduitErrorCode rval = CreateRecvStream();
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.h
@@ -464,18 +464,18 @@ private:
   // scaled by *10 because Atomic<double/float> isn't supported
   mozilla::Atomic<int32_t, mozilla::Relaxed> mLastFramerateTenths;
   unsigned short mNumReceivingStreams;
   bool mVideoLatencyTestEnable;
   uint64_t mVideoLatencyAvg;
   int mMinBitrate;
   int mStartBitrate;
   int mPrefMaxBitrate;
+  int mNegotiatedMaxBitrate;
   int mMinBitrateEstimate;
-  int mNegotiatedMaxBitrate;
 
   bool mRtpStreamIdEnabled;
   uint8_t mRtpStreamIdExtId;
 
   static const unsigned int sAlphaNum = 7;
   static const unsigned int sAlphaDen = 8;
   static const unsigned int sRoundingPadding = 1024;