summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/id3/ID3.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 0547978..6d64717 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -335,7 +335,8 @@ void ID3::Iterator::getString(String8 *id) const {
convertISO8859ToString8(mFrameData + 1, n, id);
} else {
// UCS-2
- id->setTo((const char16_t *)(mFrameData + 1), n);
+ // API wants number of characters, not number of bytes...
+ id->setTo((const char16_t *)(mFrameData + 1), n / 2);
}
}