Merge "libaudiohal@aidl: fix the encoder padding and delay ranges" into main am: c6464fd94b am: aa7f4bb30a am: 68001fadcf
Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2752766
Change-Id: I9378ad5d283f4c906b0b12591bb8a49ac28e2594
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/media/libaudiohal/impl/StreamHalAidl.cpp b/media/libaudiohal/impl/StreamHalAidl.cpp
index f9aea37..c058386 100644
--- a/media/libaudiohal/impl/StreamHalAidl.cpp
+++ b/media/libaudiohal/impl/StreamHalAidl.cpp
@@ -840,7 +840,7 @@
parameters, String8(AudioParameter::keyOffloadCodecDelaySamples),
[&](int value) {
// The legacy keys are misnamed, the value is in frames.
- return value > 0 ? mOffloadMetadata.delayFrames = value, OK : BAD_VALUE;
+ return value >= 0 ? mOffloadMetadata.delayFrames = value, OK : BAD_VALUE;
}))) {
updateMetadata = true;
}
@@ -848,7 +848,7 @@
parameters, String8(AudioParameter::keyOffloadCodecPaddingSamples),
[&](int value) {
// The legacy keys are misnamed, the value is in frames.
- return value > 0 ? mOffloadMetadata.paddingFrames = value, OK : BAD_VALUE;
+ return value >= 0 ? mOffloadMetadata.paddingFrames = value, OK : BAD_VALUE;
}))) {
updateMetadata = true;
}