| Summary: | taglib only stores first of multiple values for the same tag in XiphComments inside FLAC files | ||
|---|---|---|---|
| Product: | [Unmaintained] taglib | Reporter: | Michael Helmling <helmling> |
| Component: | general | Assignee: | Scott Wheeler <wheeler> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | lalinsky |
| Priority: | NOR | ||
| Version First Reported In: | 1.7 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Version: 1.7 (using KDE 4.5.1) OS: Linux If I try to save multiple string values for the same tag (say "artist") in the Xiph comment of a TagLib::FLAC file, using addField("ARTIST", "value", false), only the first value exists in the file after a call to save(). Strangely, if I try the same with an Ogg::Vorbis file instead of a FLAC file, it works, though both rely on the same XiphComment class. Reproducible: Didn't try Steps to Reproduce: Compile the following minimal C++ program, provide an arbitrary file empty.flac in the same directory, and run the program twice. #include <tag.h> #include <vorbisfile.h> #include <flacfile.h> #include <iostream> using namespace TagLib; using namespace std; int main() { FLAC::File f("empty.flac"); Ogg::XiphComment* c = f.xiphComment(true); Ogg::FieldListMap m = c->fieldListMap(); cout << m["ARTIST"].toString() << endl; c->addField("ARTIST", "artist 1", true); c->addField("ARTIST", "artist 2", false); m = c->fieldListMap(); cout << m["ARTIST"].toString() << endl; f.save(); } Actual Results: The output of the second run is artist 1 artist 1 artist 2 indicating that only the first string was stored (this can also be virified with a tagging program that supports multiple values, e.g. exfalso). Expected Results: Both values should be stored, so the second run should output artist 1 artist 2 artist 1 artist 2 as happens with ogg files. Testet with both Taglib 1.6.3 (current in ubuntu 10.10) and 1.7 (compiled from source).