OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60c9301
)
Do not change the number of bytes while converting 8-bit samples to 16-bit,
author
Gloria Wang
<gwang@google.com>
Fri, 22 Jul 2011 21:42:28 +0000
(14:42 -0700)
committer
Gloria Wang
<gwang@google.com>
Fri, 22 Jul 2011 21:42:28 +0000
(14:42 -0700)
because this number will be used later to calculate mCurrentPos.
Fix for bug
5063703
.
Change-Id: I75a78ef694482aa426d82a6c5f3d2ce570a9c19e
media/libstagefright/WAVExtractor.cpp
patch
|
blob
|
history
diff --git
a/media/libstagefright/WAVExtractor.cpp
b/media/libstagefright/WAVExtractor.cpp
index
bf978d7
..
c406964
100644
(file)
--- a/
media/libstagefright/WAVExtractor.cpp
+++ b/
media/libstagefright/WAVExtractor.cpp
@@
-370,7
+370,9
@@
status_t WAVSource::read(
int16_t *dst = (int16_t *)tmp->data();
const uint8_t *src = (const uint8_t *)buffer->data();
- while (n-- > 0) {
+ ssize_t numBytes = n;
+
+ while (numBytes-- > 0) {
*dst++ = ((int16_t)(*src) - 128) * 256;
++src;
}