Make CodecType conversion functions non-optional.

We can't handle no value here anyway and end up setting a default
at each call site. The defaults aren't even the same in each place.

BUG=None

Review-Url: https://codereview.webrtc.org/2998293002
Cr-Commit-Position: refs/heads/master@{#19485}
This commit is contained in:
kthelgason
2017-08-24 03:52:48 -07:00
committed by Commit Bot
parent 821e21402d
commit 1cdddc96fa
19 changed files with 56 additions and 71 deletions

View File

@ -104,8 +104,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
VideoCodec video_codec;
memset(&video_codec, 0, sizeof(video_codec));
video_codec.codecType = PayloadNameToCodecType(payload_name)
.value_or(VideoCodecType::kVideoCodecGeneric);
video_codec.codecType = PayloadStringToCodecType(payload_name);
switch (config.content_type) {
case VideoEncoderConfig::ContentType::kRealtimeVideo: