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