diff options
author | James Dong <jdong@google.com> | 2010-12-13 15:24:48 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-12-13 15:26:20 -0800 |
commit | 36fb2077764093a0a19ed65770078b9987bd82b1 (patch) | |
tree | a290816a42828539ae6aa4cfeb86d74b568936f2 /media | |
parent | 985f838934510983d8a887461e98dca60a6e858f (diff) | |
download | frameworks_av-36fb2077764093a0a19ed65770078b9987bd82b1.zip frameworks_av-36fb2077764093a0a19ed65770078b9987bd82b1.tar.gz frameworks_av-36fb2077764093a0a19ed65770078b9987bd82b1.tar.bz2 |
Fix an issue where a fixed number of bits per sample is used for seek position calculation.
The patch was from NV.
bug - 3278233
Change-Id: I9bc22b6b0ee6bfa5d4617a8c497f67eb577efca4
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/WAVExtractor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/WAVExtractor.cpp b/media/libstagefright/WAVExtractor.cpp index 446021c..9332120 100644 --- a/media/libstagefright/WAVExtractor.cpp +++ b/media/libstagefright/WAVExtractor.cpp @@ -318,7 +318,7 @@ status_t WAVSource::read( int64_t seekTimeUs; ReadOptions::SeekMode mode; if (options != NULL && options->getSeekTo(&seekTimeUs, &mode)) { - int64_t pos = (seekTimeUs * mSampleRate) / 1000000 * mNumChannels * 2; + int64_t pos = (seekTimeUs * mSampleRate) / 1000000 * mNumChannels * (mBitsPerSample >> 3); if (pos > mSize) { pos = mSize; } |