diff options
author | Vineeta Srivastava <vsrivastava@google.com> | 2013-10-23 19:58:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-23 19:58:15 +0000 |
commit | f3a6234ba21640cf2bc893dbcb98fb9b0fa47481 (patch) | |
tree | f964848a5dc1229230b76e5ea2349a7e958e3425 /media | |
parent | 95c03858e2ab4fb693a2bfe47b3caa806e43c044 (diff) | |
parent | b65473f4f881ee7c0a24217ceac69514f6c127d5 (diff) | |
download | frameworks_av-f3a6234ba21640cf2bc893dbcb98fb9b0fa47481.zip frameworks_av-f3a6234ba21640cf2bc893dbcb98fb9b0fa47481.tar.gz frameworks_av-f3a6234ba21640cf2bc893dbcb98fb9b0fa47481.tar.bz2 |
Merge "Fix kAutoRampDurationUs overflow issue" into klp-dev
Diffstat (limited to 'media')
-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, |