Let SessionDescription take ownership of MediaDescription

This documents in the API what is already true in the
implementation - that SessionDescription will eventually
delete MediaDescription objects passed to it.

The old API is preserved for backwards compatibility, but
marked as RTC_DEPRECATED.

Bug: webrtc:10701
Change-Id: I9a822b20cf3e58c5945fa51dbf6082960a332de8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139880
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28144}
This commit is contained in:
Harald Alvestrand
2019-06-03 20:35:45 +02:00
committed by Commit Bot
parent 1fe119f12f
commit 1716d39714
14 changed files with 257 additions and 132 deletions

View File

@ -687,11 +687,13 @@ TEST_P(PeerConnectionBundleTest,
ASSERT_GE(offer->description()->contents().size(), 2U);
offer->description()
->contents()[0]
.description->mutable_streams()[0]
.media_description()
->mutable_streams()[0]
.ssrcs[0] = 1111222;
offer->description()
->contents()[1]
.description->mutable_streams()[0]
.media_description()
->mutable_streams()[0]
.ssrcs[0] = 1111222;
EXPECT_TRUE(
caller->SetLocalDescription(CloneSessionDescription(offer.get())));