From 8d1f72852e9839abb7cb96271bc367339dfee518 Mon Sep 17 00:00:00 2001 From: Ilya Nikolaevskiy Date: Mon, 23 Mar 2020 11:13:52 +0100 Subject: [PATCH] [VP9 decoder] react to incorrect pixel format in the bitstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: chromium:1063490 Change-Id: Ibac3b43b42c1b088b6ac94ae327f23b11d3fd259 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171225 Reviewed-by: Erik Språng Commit-Queue: Ilya Nikolaevskiy Cr-Commit-Position: refs/heads/master@{#30855} --- modules/video_coding/codecs/vp9/vp9_impl.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc index 3b928f147a..99d1abe2b8 100644 --- a/modules/video_coding/codecs/vp9/vp9_impl.cc +++ b/modules/video_coding/codecs/vp9/vp9_impl.cc @@ -1764,6 +1764,11 @@ int VP9DecoderImpl::ReturnFrame( // frame buffer is through a callback function. This is where we // should release |img_buffer|. rtc::KeepRefUntilDone(img_buffer)); + } else { + RTC_LOG(LS_ERROR) + << "Unsupported pixel format produced by the decoder: " + << static_cast(img->fmt); + return WEBRTC_VIDEO_CODEC_NO_OUTPUT; } break; case 10: