diff options
Diffstat (limited to 'apps/metadata/id3tags.c')
-rw-r--r-- | apps/metadata/id3tags.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c index 3cbebc12e3..c1d9cb2020 100644 --- a/apps/metadata/id3tags.c +++ b/apps/metadata/id3tags.c | |||
@@ -370,14 +370,8 @@ static int parseuser( struct mp3entry* entry, char* tag, int bufferpos ) | |||
370 | entry->albumartist = tag; | 370 | entry->albumartist = tag; |
371 | #if CONFIG_CODEC == SWCODEC | 371 | #if CONFIG_CODEC == SWCODEC |
372 | } else { | 372 | } else { |
373 | /* Calculate residual buffer size in bytes which can be used by | 373 | /* Call parse_replaygain(). */ |
374 | * parse_replaygain() to save the string representation of | 374 | parse_replaygain(tag, value, entry); |
375 | * replaygain data.*/ | ||
376 | length = sizeof(entry->id3v2buf) - (tag - entry->id3v2buf); | ||
377 | |||
378 | /* Call parse_replaygain(), returns length in bytes used by the | ||
379 | * string representation of replaygain data. */ | ||
380 | length = parse_replaygain(tag, value, entry, tag, length); | ||
381 | #endif | 375 | #endif |
382 | } | 376 | } |
383 | } | 377 | } |
@@ -387,12 +381,11 @@ static int parseuser( struct mp3entry* entry, char* tag, int bufferpos ) | |||
387 | 381 | ||
388 | #if CONFIG_CODEC == SWCODEC | 382 | #if CONFIG_CODEC == SWCODEC |
389 | /* parse RVA2 binary data and convert to replaygain information. */ | 383 | /* parse RVA2 binary data and convert to replaygain information. */ |
390 | static int parserva2( struct mp3entry* entry, char* tag, int bufferpos ) | 384 | static int parserva2( struct mp3entry* entry, char* tag, int bufferpos) |
391 | { | 385 | { |
392 | int desc_len = strlen(tag); | 386 | int desc_len = strlen(tag); |
393 | int start_pos = tag - entry->id3v2buf; | 387 | int start_pos = tag - entry->id3v2buf; |
394 | int end_pos = start_pos + desc_len + 5; | 388 | int end_pos = start_pos + desc_len + 5; |
395 | int value_len = 0; | ||
396 | unsigned char* value = tag + desc_len + 1; | 389 | unsigned char* value = tag + desc_len + 1; |
397 | 390 | ||
398 | /* Only parse RVA2 replaygain tags if tag version == 2.4 and channel | 391 | /* Only parse RVA2 replaygain tags if tag version == 2.4 and channel |
@@ -447,11 +440,10 @@ static int parserva2( struct mp3entry* entry, char* tag, int bufferpos ) | |||
447 | } | 440 | } |
448 | } | 441 | } |
449 | 442 | ||
450 | value_len = parse_replaygain_int(album, gain, peak * 2, entry, | 443 | parse_replaygain_int(album, gain, peak * 2, entry); |
451 | tag, sizeof(entry->id3v2buf) - start_pos); | ||
452 | } | 444 | } |
453 | 445 | ||
454 | return start_pos + value_len; | 446 | return start_pos; |
455 | } | 447 | } |
456 | #endif | 448 | #endif |
457 | 449 | ||