Camera: HeicCompositeStream: Fix IDLE state transition
It's not sufficient to check mPendingInputFrames for wether
the device is idle. mSettingsByFrameNumber contains requests
not yet queued into mPendingInputFrames. And it also needs to be
considered.
Flag: EXEMPT bugfix
Test: vendor test
Bug: 361290241
Change-Id: I9d9a71b2ed29f2191b824078b8fc54ac6250d890
diff --git a/services/camera/libcameraservice/api2/HeicCompositeStream.cpp b/services/camera/libcameraservice/api2/HeicCompositeStream.cpp
index 206c879..3af673b 100644
--- a/services/camera/libcameraservice/api2/HeicCompositeStream.cpp
+++ b/services/camera/libcameraservice/api2/HeicCompositeStream.cpp
@@ -1311,7 +1311,9 @@
if (firstPendingFrame != mPendingInputFrames.end()) {
updateCodecQualityLocked(firstPendingFrame->second.quality);
} else {
- markTrackerIdle();
+ if (mSettingsByFrameNumber.size() == 0) {
+ markTrackerIdle();
+ }
}
}
}
@@ -1737,7 +1739,9 @@
// removed, they are simply skipped.
mPendingInputFrames.erase(failingFrameNumber);
if (mPendingInputFrames.size() == 0) {
- markTrackerIdle();
+ if (mSettingsByFrameNumber.size() == 0) {
+ markTrackerIdle();
+ }
}
return true;
}