Index: webrtc/video/video_decoder.cc |
diff --git a/webrtc/video/video_decoder.cc b/webrtc/video/video_decoder.cc |
index 5bf503cd80242632bc57414e412ac62fc653579e..d5cbb4ed89498db222a211c6b7f4b9719fcb674b 100644 |
--- a/webrtc/video/video_decoder.cc |
+++ b/webrtc/video/video_decoder.cc |
@@ -20,6 +20,15 @@ namespace webrtc { |
VideoDecoder* VideoDecoder::Create(VideoDecoder::DecoderType codec_type) { |
switch (codec_type) { |
case kH264: |
+ if (!H264Decoder::IsSupported()) { |
+ // This could happen in a software-fallback for a codec type only |
+ // supported externally (e.g. H.264 on iOS or Android) or in current |
+ // usage in WebRtcVideoEngine2 if the external decoder fails to be |
+ // created. |
+ LOG(LS_ERROR) << "Unable to create a software H.264 decoder. " |
+ << "Decoding of this stream will be broken."; |
+ return new NullVideoDecoder(); |
+ } |
RTC_DCHECK(H264Decoder::IsSupported()); |
pbos-webrtc
2016/06/26 19:15:59
Remove this DCHECK.
noahric
2016/06/27 23:15:02
Done. Also changed the log line slightly, since it
|
return H264Decoder::Create(); |
case kVp8: |