Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ObjCFrameBuffer getBuffer callback can return nullptr
https://bugs.webkit.org/show_bug.cgi?id=259265 rdar://112220174 Reviewed by Eric Carlson. RemoteVideoFrameProxy::pixelBuffer() is not guaranteed to always return a non null pixel buffer. It is trying to do so by returning a black frame if grabbing the actual video frame fails. But the black frame creation can itself fail. To prevent this, we are updating ObjCFrameBuffer so that, should the pixel buffer be nullptr, ObjCFrameBuffer::ToI420 will itself returns nullptr instead ofa I420BufferInterface which is empty inside. The rest of libwebrtc deals with nullptr I420BufferInterface by exiting encoding early. Manually tested by updating RemoteVideoFrameProxy::pixelBuffer() to return nullptr. * Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/native/src/objc_frame_buffer.mm: (webrtc::ObjCFrameBuffer::ToI420): (webrtc::ObjCFrameBuffer::wrapped_frame_buffer const): Canonical link: https://commits.webkit.org/266097@main
- Loading branch information