fix: Fix "Invalid pixel format 35" HardwareBuffer crash (#2547)
This commit is contained in:
@@ -228,7 +228,11 @@ class VideoPipeline(
|
||||
@RequiresApi(Build.VERSION_CODES.Q)
|
||||
private fun supportsHardwareBufferFlags(flags: Long): Boolean {
|
||||
val hardwareBufferFormat = format.toHardwareBufferFormat()
|
||||
try {
|
||||
return HardwareBuffer.isSupported(width, height, hardwareBufferFormat, 1, flags)
|
||||
} catch (_: Throwable) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private external fun getInputTextureId(): Int
|
||||
|
Reference in New Issue
Block a user