Disagreement between MPEG::File::ID3v1Tag docs and behavior

Tom Kleinpeter tomkleinpeter at gmail.com
Thu Jul 3 03:28:11 CEST 2008


Hello,

The ID3v1Tag and ID3v2Tag functions have notes like these in the docs:

"If create is false (the default) this will return a null pointer if
there is no valid ID3v1 tag. If create is true it will create an ID3v1
tag if one does not exist."

But, I'm not seeing that behavior in practice -- I'm always getting a
valid pointer even if there isn't a tag on the file.  Looking at the
read() function in mpegfile.cpp in the current release, I see these
lines which seem to contradict what the docs say:

// Make sure that we have our default tag types available.
  ID3v2Tag(true);
  ID3v1Tag(true);

Going through the logs, those were added at revision 768978 along with
a bunch of other changes.

Is this a bug?  If this is the correct behavior and the docs are just
out of date, what is the correct way to check if a file has tags?

Thanks,
Tom


More information about the taglib-devel mailing list