Menu

#25 ID3v2Tag.ReadTag cannot handle null comment

v0.2-Dev
open
nobody
None
5
2012-09-15
2006-08-06
Anonymous
No

After checking for existance of V2 tag, if the tag
contains a null comment (a comment line with no text)
an exception is thrown in WXXXFrame.cs

a possible work around is submitted below, but it may
not be elegant (there is probably a much better method)

....
IList<encodedstring> strings =
EncodedString.CreateStrings( frameData, 1,
delegate( byte[] leftoverBytes ) {
byte[] urlBytes = leftoverBytes;
strings = EncodedString.CreateStrings(
URLLinkFrame.UrlEncodingType, leftoverBytes );
// It crashes here with null string
if (strings.Count>0)
{
base.EncodedUrl = strings[ 0 ];
}
} );
if (strings.Count > 0)
{
description = strings[0];
SetEncodedStringSettings();
}
....</encodedstring>

Discussion


Log in to post a comment.

MongoDB Logo MongoDB