Delete ssrc book-keeping in NetEq

The ssrc for a given NetEq instance shouldn't change.

Bug: webrtc:7135
Change-Id: Iee0d4cd8bd5d917e819fa2ecf45a40e203c6d9c0
Reviewed-on: https://webrtc-review.googlesource.com/c/111661
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25825}
This commit is contained in:
Niels Möller
2018-11-21 16:07:10 +01:00
committed by Commit Bot
parent 48fcf943fd
commit bb9f4c1252
2 changed files with 1 additions and 7 deletions

View File

@ -102,7 +102,6 @@ NetEqImpl::NetEqImpl(const NetEq::Config& config,
new_codec_(false),
timestamp_(0),
reset_decoder_(false),
ssrc_(0),
first_packet_(true),
enable_fast_accelerate_(config.enable_fast_accelerate),
nack_enabled_(false),
@ -533,8 +532,7 @@ int NetEqImpl::InsertPacketInternal(const RTPHeader& rtp_header,
return packet;
}());
bool update_sample_rate_and_channels =
first_packet_ || (rtp_header.ssrc != ssrc_);
bool update_sample_rate_and_channels = first_packet_;
if (update_sample_rate_and_channels) {
// Reset timestamp scaling.
@ -561,9 +559,6 @@ int NetEqImpl::InsertPacketInternal(const RTPHeader& rtp_header,
packet_buffer_->Flush();
dtmf_buffer_->Flush();
// Store new SSRC.
ssrc_ = rtp_header.ssrc;
// Update audio buffer timestamp.
sync_buffer_->IncreaseEndTimestamp(main_timestamp - timestamp_);

View File

@ -401,7 +401,6 @@ class NetEqImpl : public webrtc::NetEq {
absl::optional<uint8_t> current_rtp_payload_type_ RTC_GUARDED_BY(crit_sect_);
absl::optional<uint8_t> current_cng_rtp_payload_type_
RTC_GUARDED_BY(crit_sect_);
uint32_t ssrc_ RTC_GUARDED_BY(crit_sect_);
bool first_packet_ RTC_GUARDED_BY(crit_sect_);
bool enable_fast_accelerate_ RTC_GUARDED_BY(crit_sect_);
std::unique_ptr<NackTracker> nack_ RTC_GUARDED_BY(crit_sect_);