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:
@ -30,10 +30,8 @@
|
||||
- (instancetype)initWithNativeVideoCodec:(const webrtc::VideoCodec *)videoCodec {
|
||||
if (self = [super init]) {
|
||||
if (videoCodec) {
|
||||
rtc::Optional<const char *> codecName = CodecTypeToPayloadName(videoCodec->codecType);
|
||||
if (codecName) {
|
||||
_name = [NSString stringWithUTF8String:codecName.value()];
|
||||
}
|
||||
const char *codecName = CodecTypeToPayloadString(videoCodec->codecType);
|
||||
_name = [NSString stringWithUTF8String:codecName];
|
||||
|
||||
_width = videoCodec->width;
|
||||
_height = videoCodec->height;
|
||||
|
||||
Reference in New Issue
Block a user