diff options
author | Vineeta Srivastava <vsrivastava@google.com> | 2013-10-23 13:02:58 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-23 13:02:58 -0700 |
commit | 57c1f758d8811024aa1298d2ba244577c44ef7b9 (patch) | |
tree | 09b20411f94376a8de3737caac2e01915be8101c | |
parent | c20636f7a4053c6f93a8808617252afcd5dc8d50 (diff) | |
parent | f3a6234ba21640cf2bc893dbcb98fb9b0fa47481 (diff) | |
download | frameworks_av-57c1f758d8811024aa1298d2ba244577c44ef7b9.zip frameworks_av-57c1f758d8811024aa1298d2ba244577c44ef7b9.tar.gz frameworks_av-57c1f758d8811024aa1298d2ba244577c44ef7b9.tar.bz2 |
am f3a6234b: Merge "Fix kAutoRampDurationUs overflow issue" into klp-dev
* commit 'f3a6234ba21640cf2bc893dbcb98fb9b0fa47481':
Fix kAutoRampDurationUs overflow issue
-rw-r--r-- | media/libstagefright/AudioSource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index bdd842f..d7223d9 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -236,10 +236,10 @@ status_t AudioSource::read( memset((uint8_t *) buffer->data(), 0, buffer->range_length()); } else if (elapsedTimeUs < kAutoRampStartUs + kAutoRampDurationUs) { int32_t autoRampDurationFrames = - (kAutoRampDurationUs * mSampleRate + 500000LL) / 1000000LL; + ((int64_t)kAutoRampDurationUs * mSampleRate + 500000LL) / 1000000LL; //Need type casting int32_t autoRampStartFrames = - (kAutoRampStartUs * mSampleRate + 500000LL) / 1000000LL; + ((int64_t)kAutoRampStartUs * mSampleRate + 500000LL) / 1000000LL; //Need type casting int32_t nFrames = mNumFramesReceived - autoRampStartFrames; rampVolume(nFrames, autoRampDurationFrames, |