summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/libwebrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/third_party/libwebrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/third_party/libwebrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index a9e9926c4f..c6446c25ce 100644
--- a/third_party/libwebrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/third_party/libwebrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -80,7 +80,11 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
kPixelFormatsSupported.begin(), kPixelFormatsSupported.end(),
[context](AVPixelFormat format) { return context->pix_fmt == format; });
- RTC_CHECK(pixelFormatSupported != kPixelFormatsSupported.end());
+ if (pixelFormatSupported == kPixelFormatsSupported.end()) {
+ RTC_LOG(LS_ERROR) << "Unsupported pixel format: " << context->pix_fmt;
+ decoder->ReportError();
+ return -1;
+ }
// `av_frame->width` and `av_frame->height` are set by FFmpeg. These are the
// actual image's dimensions and may be different from `context->width` and