Avoid holding lock while calling stream_resetter_ in MaxPaddingSetTest

BUG=webrtc:7330

Review-Url: https://codereview.webrtc.org/2745083002
Cr-Commit-Position: refs/heads/master@{#17207}
This commit is contained in:
tommi 2017-03-13 05:15:14 -07:00 committed by Commit bot
parent d15165222f
commit 39e1289e64

View File

@ -1535,7 +1535,9 @@ class MaxPaddingSetTest : public test::SendTest {
send_stream_config_(nullptr),
packets_sent_(0),
running_without_padding_(test_switch_content_type),
stream_resetter_(stream_reset_fun) {}
stream_resetter_(stream_reset_fun) {
RTC_DCHECK(stream_resetter_);
}
void OnVideoStreamsCreated(
VideoSendStream* send_stream,
@ -1598,8 +1600,6 @@ class MaxPaddingSetTest : public test::SendTest {
if (RunningWithoutPadding()) {
ASSERT_TRUE(
content_switch_event_.Wait(test::CallTest::kDefaultTimeoutMs));
rtc::CritScope lock(&crit_);
RTC_DCHECK(stream_resetter_);
(*stream_resetter_)(send_stream_config_, encoder_config_);
}