Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

metadata: mp3: update out-of-date comments

(L1033 + L1170)

As of commit f3e5ced, tags will be parsed
unconditionally, regardless of whether
they've been filled already.

Change-Id: I7edd4b7131b33dba34f06ebe829ebdc00a138525

authored by

Christian Soffke and committed by
Solomon Peachy
63d8aa00 004304dc

+15 -15
+15 -15
lib/rbcodec/metadata/id3tags.c
··· 361 361 } 362 362 #endif 363 363 364 - /* parse user defined text, looking for album artist and replaygain 364 + /* parse user defined text, looking for album artist and replaygain 365 365 * information. 366 366 */ 367 367 static int parseuser( struct mp3entry* entry, char* tag, int bufferpos ) ··· 399 399 /* Only parse RVA2 replaygain tags if tag version == 2.4 and channel 400 400 * type is master volume. 401 401 */ 402 - if (entry->id3version == ID3_VER_2_4 && end_pos < bufferpos 402 + if (entry->id3version == ID3_VER_2_4 && end_pos < bufferpos 403 403 && *value++ == 1) { 404 404 long gain = 0; 405 405 long peak = 0; ··· 410 410 /* The RVA2 specification is unclear on some things (id string and 411 411 * peak volume), but this matches how Quod Libet use them. 412 412 */ 413 - 413 + 414 414 gain = (int16_t) ((value[0] << 8) | value[1]); 415 415 value += 2; 416 416 peakbits = *value++; 417 417 peakbytes = (peakbits + 7) / 8; 418 - 418 + 419 419 /* Only use the topmost 24 bits for peak volume */ 420 420 if (peakbytes > 3) { 421 421 peakbytes = 3; ··· 429 429 peak <<= 8; 430 430 peak += *value++; 431 431 } 432 - 432 + 433 433 peak <<= shift; 434 - 434 + 435 435 if (peakbits > 24) { 436 436 peak += *value >> (8 - shift); 437 437 } 438 438 } 439 - 439 + 440 440 static const char *tg_options[] = {"album", "track", NULL}; 441 441 int tg_op = string_option(tag, tg_options, true); 442 442 if (tg_op == 0) { /*album*/ ··· 462 462 int desc_len = strlen(tag); 463 463 /*DEBUGF("MBID len: %d\n", desc_len);*/ 464 464 /* Musicbrainz track IDs are always 36 chars long */ 465 - const size_t mbtid_len = 36; 465 + const size_t mbtid_len = 36; 466 466 467 467 if ((tag - entry->id3v2buf + desc_len + 2) < bufferpos) 468 468 { ··· 501 501 { "TP2", 3, offsetof(struct mp3entry, albumartist), NULL, false }, 502 502 { "TIT1", 4, offsetof(struct mp3entry, grouping), NULL, false }, 503 503 { "TT1", 3, offsetof(struct mp3entry, grouping), NULL, false }, 504 - { "COMM", 4, offsetof(struct mp3entry, comment), NULL, false }, 505 - { "COM", 3, offsetof(struct mp3entry, comment), NULL, false }, 504 + { "COMM", 4, offsetof(struct mp3entry, comment), NULL, false }, 505 + { "COM", 3, offsetof(struct mp3entry, comment), NULL, false }, 506 506 { "TCON", 4, offsetof(struct mp3entry, genre_string), &parsegenre, false }, 507 507 { "TCO", 3, offsetof(struct mp3entry, genre_string), &parsegenre, false }, 508 508 #ifdef HAVE_ALBUMART ··· 964 964 } 965 965 } 966 966 } 967 - 967 + 968 968 if (framelen == 0) 969 969 continue; 970 970 971 971 if (framelen < 0) 972 972 return; 973 - 973 + 974 974 /* Keep track of the remaining frame size */ 975 975 totframelen = framelen; 976 976 ··· 1029 1029 goto retry_with_limit; 1030 1030 } 1031 1031 1032 - /* found a tag matching one in tagList, and not yet filled */ 1032 + /* found a tag matching one in tagList */ 1033 1033 tag = buffer + bufferpos; 1034 1034 1035 1035 if(global_unsynch && version <= ID3_VER_2_3) ··· 1045 1045 if(unsynch || (global_unsynch && version >= ID3_VER_2_4)) 1046 1046 bytesread = unsynchronize_frame(tag, bytesread); 1047 1047 1048 - /* the COMM frame has a 3 char field to hold an ISO-639-1 1048 + /* the COMM frame has a 3 char field to hold an ISO-639-1 1049 1049 * language string and an optional short description; 1050 1050 * remove them so unicode_munge can work correctly 1051 1051 */ ··· 1165 1165 } 1166 1166 1167 1167 if( i == TAGLIST_SIZE ) { 1168 - /* no tag in tagList was found, or it was a repeat. 1168 + /* no tag in tagList was found, 1169 1169 skip it using the total size */ 1170 1170 1171 1171 if(global_unsynch && version <= ID3_VER_2_3) {