Don't dereference null buffer in the LibaomAv1Encoder.

No-Try: True
Bug: webrtc:13746
Change-Id: I6e467462c16abc0f3943c6c629d77a7ddaeb682a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257161
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36377}
This commit is contained in:
philipel
2022-03-30 13:55:49 +02:00
committed by WebRTC LUCI CQ
parent 128c4dcbea
commit ab68a914d6

View File

@ -631,8 +631,7 @@ int32_t LibaomAv1Encoder::Encode(
(absl::c_find(supported_formats, mapped_buffer->type()) ==
supported_formats.end() &&
mapped_buffer->type() != VideoFrameBuffer::Type::kI420A)) {
rtc::scoped_refptr<I420BufferInterface> converted_buffer(
mapped_buffer->ToI420());
rtc::scoped_refptr<I420BufferInterface> converted_buffer(buffer->ToI420());
if (!converted_buffer) {
RTC_LOG(LS_ERROR) << "Failed to convert "
<< VideoFrameBufferTypeToString(