Skip to content

MP3 tag stripping (APE and ID3v1) bug? #835

Closed

Description

@whatdoineed2do

I am using TagLib 1.11.1 on Fedora 26 - I have a MP3 file with ID3v2,v1 and APE tags.

When stripping the APE and ID3v1 tags in one call to f.strip(TagLib::MPEG::File::ID3v1 | TagLib::MPEG::File::APE); I find that the final output is not correct with the resulting MP3 having parts of the ID3v2 tag (at least the comment,yr) copied into the ID3v1 tag.

Is this an API user error or TagLib bug?

#include <iostream>
#include <taglib/mpegfile.h>

int main(int argc, char *argv[])
{
    if (argc != 2) {
        return 1;
    }
    try
    {
        TagLib::MPEG::File  f(argv[1], false);
        f.strip(TagLib::MPEG::File::ID3v1 | TagLib::MPEG::File::APE);
        f.save(TagLib::MPEG::File::ID3v2);
    }
    catch (const std::exception& ex)
    {
        std::cerr << ex.what() << std::endl;
    }
    return 0;
}

Attached is a dummy mp3 file that only contains the 3x tags that can be used with above code.
test.mp3.zip

Additionally, if the f.save() is removed, the resulting file will have the APE tag removed but ID3v1 tag remains untouched

Activity

  1. whatdoineed2do commented on Oct 8, 2017

    @whatdoineed2do
    ContributorAuthor

    using f.save(TagLib::MPEG::File::ID3v2, false, 4, false); also results in the original ID3v1 tag being untouched even it was requested to be stripped.

  2. whatdoineed2do commented on Jul 22, 2019

    @whatdoineed2do
    ContributorAuthor

    Newer duplicate report with investigation and fix
    #913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions