mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
fix android possible waiting for image issue (#7994)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -338,9 +338,7 @@ class MainService : Service() {
|
||||
).apply {
|
||||
setOnImageAvailableListener({ imageReader: ImageReader ->
|
||||
try {
|
||||
if (!isStart) {
|
||||
return@setOnImageAvailableListener
|
||||
}
|
||||
// If not call acquireLatestImage, listener will not be called again
|
||||
imageReader.acquireLatestImage().use { image ->
|
||||
if (image == null || !isStart) return@setOnImageAvailableListener
|
||||
val planes = image.planes
|
||||
|
||||
Reference in New Issue
Block a user