aboutsummaryrefslogtreecommitdiff
path: root/components/V4L2EncodeComponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'components/V4L2EncodeComponent.cpp')
-rw-r--r--components/V4L2EncodeComponent.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/V4L2EncodeComponent.cpp b/components/V4L2EncodeComponent.cpp
index c2a2679..f9d735d 100644
--- a/components/V4L2EncodeComponent.cpp
+++ b/components/V4L2EncodeComponent.cpp
@@ -652,6 +652,12 @@ bool V4L2EncodeComponent::initializeEncoder() {
// Get the requested bitrate mode and bitrate. The C2 framework doesn't offer a parameter to
// configure the peak bitrate, so we use a multiple of the target bitrate.
mBitrateMode = mInterface->getBitrateMode();
+ if (property_get_bool("persist.vendor.v4l2_codec2.disable_vbr", false)) {
+ // NOTE: This is a workaround for b/235771157.
+ ALOGW("VBR is disabled on this device");
+ mBitrateMode = C2Config::BITRATE_CONST;
+ }
+
mBitrate = mInterface->getBitrate();
mEncoder = V4L2Encoder::create(