Samuel Krempp krempp at
Sun Sep 12 23:49:26 CEST 2004

If there are id3v2 lyrics at the end of the file, the function findApe()
in mpegfile.cpp misses the APE tag (it happened on some of my files,
that had lyrics, and which I mp3gained).

I had a look at apetag.c in mp3gain's sources, it parses id3v1 tags and
id3v2 lyrics frames in a loop until all end-of-file tags have been
parsed :

    fseek(fi, 0, SEEK_END);
    tag_offset = ftell(fi);

    do {
		offs_bk = tag_offset;
		ReadMP3APETag ( fi, info, &(fileTags->apeTag), &tag_offset );
        ReadMP3Lyrics3v2Tag ( fi, &(fileTags->lyrics3tag),
&(fileTags->lyrics3TagSize), &(fileTags->id31tag), &tag_offset );
		ReadMP3ID3v1Tag ( fi, &(fileTags->id31tag), &tag_offset );
	} while ( offs_bk != tag_offset );

I guess findApe() should do the same kind of loop in order to catch APE
tags in all cases.


More information about the taglib-devel mailing list