Check ConvertToI420 result for all errors in VideoCaptureImpl::IncomingFrame

Bug: webrtc:15415
Change-Id: Ia303e1803d8238c4db68c7dc8d207b0ccfccadba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316343
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40762}
This commit is contained in:
Michael Froman 2023-08-16 16:31:19 -05:00 committed by WebRTC LUCI CQ
parent 96bc094d38
commit 3e1484e280

View File

@ -214,7 +214,7 @@ int32_t VideoCaptureImpl::IncomingFrame(uint8_t* videoFrame,
buffer.get()->StrideV(), 0, 0, // No Cropping
width, height, target_width, target_height, rotation_mode,
ConvertVideoType(frameInfo.videoType));
if (conversionResult < 0) {
if (conversionResult != 0) {
RTC_LOG(LS_ERROR) << "Failed to convert capture frame from type "
<< static_cast<int>(frameInfo.videoType) << "to I420.";
return -1;