summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/id3
diff options
context:
space:
mode:
authorJesper Tragardh <jesper.tragardh@sonyericsson.com>2012-07-11 14:13:47 +0200
committerHenrik Baard <henrik.baard@sonymobile.com>2012-07-11 14:34:03 +0200
commitbe5016bac5c1b422d850e299d3cb11fecf0ac19d (patch)
tree17428986fa1b37a56a5040b42868b5950b303b4c /media/libstagefright/id3
parentffb829430ff20ccd6c13e6ed894f2373b2d93939 (diff)
downloadframeworks_av-be5016bac5c1b422d850e299d3cb11fecf0ac19d.zip
frameworks_av-be5016bac5c1b422d850e299d3cb11fecf0ac19d.tar.gz
frameworks_av-be5016bac5c1b422d850e299d3cb11fecf0ac19d.tar.bz2
Correct ID3::StringSize calculation for UCS-2 data.
Album art was not displayed when albums were transferred via MediaGo because the length of the description in the APIC tag was not correctly calculated. The method StringSize used to calculate the length of the tag does not add the size of the null termination in UCS-2 case. Change-Id: I5409d42f5e87d315e6e03c4d7e6cbd8a378a160d
Diffstat (limited to 'media/libstagefright/id3')
-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 ca14054..69274ca 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -743,7 +743,8 @@ static size_t StringSize(const uint8_t *start, uint8_t encoding) {
n += 2;
}
- return n;
+ // Add size of null termination.
+ return n + 2;
}
const void *