Set local ssrc at construction (audio)

Changing the ssrc for a module is intended to be removed, and will in
the future require creating a new instance.

Bug: webrtc:10774
Change-Id: Ie96daa4a8cf00223ea040509037582f6b1c8eb19
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145205
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28571}
diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc
index 9190441..c0ee0ed 100644
--- a/audio/audio_send_stream.cc
+++ b/audio/audio_send_stream.cc
@@ -113,7 +113,8 @@
                                              config.frame_encryptor,
                                              config.crypto_options,
                                              config.rtp.extmap_allow_mixed,
-                                             config.rtcp_report_interval_ms)) {}
+                                             config.rtcp_report_interval_ms,
+                                             config.rtp.ssrc)) {}
 
 AudioSendStream::AudioSendStream(
     Clock* clock,
@@ -239,11 +240,12 @@
   RTC_DCHECK(first_time ||
              old_config.send_transport == new_config.send_transport);
 
-  if (first_time || old_config.rtp.ssrc != new_config.rtp.ssrc) {
+  if (old_config.rtp.ssrc != new_config.rtp.ssrc) {
     channel_send->SetLocalSSRC(new_config.rtp.ssrc);
-    if (stream->suspended_rtp_state_) {
-      stream->rtp_rtcp_module_->SetRtpState(*stream->suspended_rtp_state_);
-    }
+  }
+  if (stream->suspended_rtp_state_ &&
+      (first_time || old_config.rtp.ssrc != new_config.rtp.ssrc)) {
+    stream->rtp_rtcp_module_->SetRtpState(*stream->suspended_rtp_state_);
   }
   if (first_time || old_config.rtp.c_name != new_config.rtp.c_name) {
     channel_send->SetRTCP_CNAME(new_config.rtp.c_name);