Slight code clarification in RemoveStoppedTransceivers.
There's no change in functionality, which was verified by adding an 'else' catch-all clause in the loop with an RTC_NOTREACHED() statement. See patchset #3. This is mostly a cosmetic change that modifies the loop such that it's guaranteed that Remove() is always called for transceivers whose state is "stopped" and there's just one place where Remove() is called. Bug: none Change-Id: Iffe237bb2f08e5e6ef316a6b76c4b183df671f3b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215232 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33765}
This commit is contained in:

committed by
Commit Bot

parent
0ee5bcfdee
commit
7fa8d46516
@ -4275,20 +4275,16 @@ void SdpOfferAnswerHandler::RemoveStoppedTransceivers() {
|
||||
if ((local_content && local_content->rejected) ||
|
||||
(remote_content && remote_content->rejected)) {
|
||||
RTC_LOG(LS_INFO) << "Dissociating transceiver"
|
||||
<< " since the media section is being recycled.";
|
||||
" since the media section is being recycled.";
|
||||
transceiver->internal()->set_mid(absl::nullopt);
|
||||
transceiver->internal()->set_mline_index(absl::nullopt);
|
||||
transceivers()->Remove(transceiver);
|
||||
continue;
|
||||
}
|
||||
if (!local_content && !remote_content) {
|
||||
} else if (!local_content && !remote_content) {
|
||||
// TODO(bugs.webrtc.org/11973): Consider if this should be removed already
|
||||
// See https://github.com/w3c/webrtc-pc/issues/2576
|
||||
RTC_LOG(LS_INFO)
|
||||
<< "Dropping stopped transceiver that was never associated";
|
||||
transceivers()->Remove(transceiver);
|
||||
continue;
|
||||
}
|
||||
transceivers()->Remove(transceiver);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user