summaryrefslogtreecommitdiff
path: root/apps/metadata/id3tags.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/metadata/id3tags.c')
-rw-r--r--apps/metadata/id3tags.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index 9ee183a1b3..9143f8ad25 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -358,8 +358,7 @@ static int parseuser( struct mp3entry* entry, char* tag, int bufferpos )
358 358
359 if ((tag - entry->id3v2buf + desc_len + 2) < bufferpos) { 359 if ((tag - entry->id3v2buf + desc_len + 2) < bufferpos) {
360 /* At least part of the value was read, so we can safely try to 360 /* At least part of the value was read, so we can safely try to
361 * parse it 361 * parse it */
362 */
363 value = tag + desc_len + 1; 362 value = tag + desc_len + 1;
364 value_len = bufferpos - (tag - entry->id3v2buf); 363 value_len = bufferpos - (tag - entry->id3v2buf);
365 364
@@ -368,8 +367,7 @@ static int parseuser( struct mp3entry* entry, char* tag, int bufferpos )
368 entry->albumartist = tag; 367 entry->albumartist = tag;
369#if CONFIG_CODEC == SWCODEC 368#if CONFIG_CODEC == SWCODEC
370 } else { 369 } else {
371 value_len = parse_replaygain(tag, value, entry, tag, 370 value_len = parse_replaygain(tag, value, entry, tag, value_len);
372 value_len);
373#endif 371#endif
374 } 372 }
375 } 373 }
@@ -1040,6 +1038,12 @@ void setid3v2title(int fd, struct mp3entry *entry)
1040#endif 1038#endif
1041 if( tr->ppFunc ) 1039 if( tr->ppFunc )
1042 bufferpos = tr->ppFunc(entry, tag, bufferpos); 1040 bufferpos = tr->ppFunc(entry, tag, bufferpos);
1041
1042 /* Trim. Take into account that multiple string contents will
1043 * only be displayed up to their first null termination. All
1044 * content after this null termination is obsolete and can be
1045 * overwritten. */
1046 bufferpos -= (bytesread - strlen(tag));
1043 1047
1044 /* Seek to the next frame */ 1048 /* Seek to the next frame */
1045 if(framelen < totframelen) 1049 if(framelen < totframelen)