commit | c5f378e835c9278587c9d00c84e51ef38fdaf4a6 | [log] [tgz] |
---|---|---|
author | Mikhail Naganov <mnaganov@google.com> | Thu Jun 22 15:18:57 2023 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Thu Jun 22 15:18:57 2023 +0000 |
tree | 8e641b780d668c6ec90deb4406c4995d2dc3ea30 | |
parent | 2342e7af484b195a79b94ac4999520a63c8f4492 [diff] [blame] |
Enlarge the width of AudioTimestampInternal.position Change the AIDL type of the field to `long` because it must be able to hold all values from AudioTimestamp::mPosition, which has type `uint32_t`. Bug: 287590875 Test: m (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:387360400c228be6323f0070a139c63163b86994) Merged-In: Id0b4ab3325b5622fddae7320516f38b3e9efbe21 Change-Id: Id0b4ab3325b5622fddae7320516f38b3e9efbe21
diff --git a/media/libaudioclient/AidlConversion.cpp b/media/libaudioclient/AidlConversion.cpp index bd10e44..2377fc8 100644 --- a/media/libaudioclient/AidlConversion.cpp +++ b/media/libaudioclient/AidlConversion.cpp
@@ -528,7 +528,7 @@ ConversionResult<media::AudioTimestampInternal> legacy2aidl_AudioTimestamp_AudioTimestampInternal(const AudioTimestamp& legacy) { media::AudioTimestampInternal aidl; - aidl.position = VALUE_OR_RETURN(convertIntegral<int32_t>(legacy.mPosition)); + aidl.position = VALUE_OR_RETURN(convertIntegral<int64_t>(legacy.mPosition)); aidl.sec = VALUE_OR_RETURN(convertIntegral<int64_t>(legacy.mTime.tv_sec)); aidl.nsec = VALUE_OR_RETURN(convertIntegral<int32_t>(legacy.mTime.tv_nsec)); return aidl;