Optional: Use nullopt and implicit construction in /modules/audio_coding
Changes places where we explicitly construct an Optional to instead use nullopt or the requisite value type only. This CL was uploaded by git cl split. R=kwiberg@webrtc.org Bug: None Change-Id: I055411a3e521964c81100869a197dd92f5608f1b Reviewed-on: https://webrtc-review.googlesource.com/23619 Commit-Queue: Oskar Sundbom <ossu@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Elad Alon <eladalon@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20728}
This commit is contained in:
committed by
Commit Bot
parent
f715c53bca
commit
12ab00b4d8
@ -184,8 +184,7 @@ class AudioCodingModuleTestOldApi : public ::testing::Test {
|
||||
|
||||
// Set up L16 codec.
|
||||
virtual void SetUpL16Codec() {
|
||||
audio_format_ =
|
||||
rtc::Optional<SdpAudioFormat>(SdpAudioFormat("L16", kSampleRateHz, 1));
|
||||
audio_format_ = SdpAudioFormat("L16", kSampleRateHz, 1);
|
||||
ASSERT_EQ(0, AudioCodingModule::Codec("L16", &codec_, kSampleRateHz, 1));
|
||||
codec_.pltype = kPayloadType;
|
||||
}
|
||||
@ -660,8 +659,7 @@ class AcmIsacMtTestOldApi : public AudioCodingModuleMtTestOldApi {
|
||||
|
||||
void RegisterCodec() override {
|
||||
static_assert(kSampleRateHz == 16000, "test designed for iSAC 16 kHz");
|
||||
audio_format_ =
|
||||
rtc::Optional<SdpAudioFormat>(SdpAudioFormat("isac", kSampleRateHz, 1));
|
||||
audio_format_ = SdpAudioFormat("isac", kSampleRateHz, 1);
|
||||
AudioCodingModule::Codec("ISAC", &codec_, kSampleRateHz, 1);
|
||||
codec_.pltype = kPayloadType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user