Fix crash when there's unexpected non-YUV buffer input.
The lockYCbCr returns NO_ERROR when called on non-YUV buffer, but all pointers in android_ycbcr are set to null. Check that the buffer has expected pixel format and fail early (and gracefully) when it doesn't. Bug: 301023410 Test: atest VirtualCameraTest (modified) Change-Id: I5af39c3d844392eac02f32ee55a50a2a2899466b
Loading
Please register or sign in to comment