diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-07-07 01:35:58 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-07-07 01:35:58 +0000 |
commit | 8f4098688d6edb5f665b13cf9b7a67cbd812398c (patch) | |
tree | c4334fa4f01579423961d6807147275466f34f87 | |
parent | 389dd06e9bc9d090e2db7e54d950eb0784347a0c (diff) | |
parent | 0bd2d6331bde6053d778f84633759f1336627a79 (diff) | |
download | v4l2_codec2-8f4098688d6edb5f665b13cf9b7a67cbd812398c.tar.gz |
Snap for 8803894 from 0bd2d6331bde6053d778f84633759f1336627a79 to mainline-permission-releaseaml_per_331913010aml_per_331812030aml_per_331710050aml_per_331611010aml_per_331512020aml_per_331411000aml_per_331313010aml_per_331115020aml_per_331019040aml_per_330912010android13-mainline-permission-release
Change-Id: Ie324030b4aef95aca6be198dadf92b98e6428715
-rw-r--r-- | components/V4L2EncodeComponent.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/V4L2EncodeComponent.cpp b/components/V4L2EncodeComponent.cpp index 4ce4404..c2a2679 100644 --- a/components/V4L2EncodeComponent.cpp +++ b/components/V4L2EncodeComponent.cpp @@ -757,7 +757,8 @@ bool V4L2EncodeComponent::encode(C2ConstGraphicBlock block, uint64_t index, int6 constexpr int64_t kMaxFramerateDiff = 5; if (mLastFrameTime && (timestamp > *mLastFrameTime)) { int64_t newFramerate = std::max( - static_cast<int64_t>(std::round(1000000.0 / (timestamp - *mLastFrameTime))), 1LL); + static_cast<int64_t>(std::round(1000000.0 / (timestamp - *mLastFrameTime))), + static_cast<int64_t>(1LL)); if (abs(mFramerate - newFramerate) > kMaxFramerateDiff) { ALOGV("Adjusting framerate to %" PRId64 " based on frame timestamps", newFramerate); mInterface->setFramerate(static_cast<uint32_t>(newFramerate)); |