[ID3 Dev] Can text frames be empty
Scott Wheeler
wheeler at kde.org
Sun Feb 11 19:39:04 PST 2007
On Sun, 11 Feb 2007 13:28:45 -0600, Dale Preston wrote:
> The description for ID3V2.3 frames says that frames must include at least
> one byte of data. How does this rule applied to text frames? For instance,
> if track number is not set, is a TRCK frame with the frame data as { 0, 0 },
> representing an encoding byte, no string data, and then a null termination
> byte, considered a valid frame?
It's valid from the perspective of the general frame definition --
specifically, for its purposes, everything after the frame header is
"data" including the encoding byte.
Also note (as this seems to be something that most people haven't
caught) that null termination of strings is neither required nor
recommended in the ID3v2 standards. In ID3v2.3 it simply implies that
everything following that should be ignored; in 2.4 it is used as the
separator for a list of values. Thus a null terminated string in 2.4
with a strict parser would imply a list of ( "value", "" ).
> If it is valid, is it still better to remove the empty frame? For instance,
> if track number is not set, is it better to leave an existing TRCK frame
> with 0,0 for the data or is it better to remove the TRCK frame altogether?
I think that's up to you. I'd tend to say culling them while parsing
the tag is the way to go.
Cheers,
-Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org
More information about the ID3v2
mailing list