Index: webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm b/webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm |
index 5a1a51f3f5a515757d14fdf1ca7bfa4ab1f5ffa3..9d4f2b8e0aadc237202d09cefcc3edcbcf62e5d6 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.mm |
@@ -104,13 +104,9 @@ id<RTCVideoDecoderFactory> ObjCVideoDecoderFactory::wrapped_decoder_factory() co |
} |
VideoDecoder *ObjCVideoDecoderFactory::CreateVideoDecoder(VideoCodecType type) { |
- const rtc::Optional<const char *> codec_name = CodecTypeToPayloadName(type); |
- if (!codec_name) { |
- LOG(LS_ERROR) << "Invalid codec type: " << type; |
- return nullptr; |
- } |
+ const char *codec_name = CodecTypeToPayloadString(type); |
- NSString *codecName = [NSString stringWithUTF8String:codec_name.value()]; |
+ NSString *codecName = [NSString stringWithUTF8String:codec_name]; |
for (RTCVideoCodecInfo *codecInfo in decoder_factory_.supportedCodecs) { |
if ([codecName isEqualToString:codecInfo.name]) { |
id<RTCVideoDecoder> decoder = [decoder_factory_ createDecoder:codecInfo]; |