I am trying to read id3 tags with id3v2lib
My code is:
ID3v2_tag* tag = load_tag(argv[1]); // Load the full tag from the file
if(!tag){
tag = new_tag();
}
const char * t = "Matej";
ID3v2_frame* artist_frame = tag_get_artist(tag); // Get the full artist frame
ID3v2_frame* title_frame = tag_get_title(tag);
ID3v2_frame_text_content* title_content = parse_text_frame_content(title_frame);
if( title_content){
cout << title_content->data << endl;
}
This does print title of song. However, for some files it prints unreadable garbage.
I am not sure if the file is somehow corrupted. But using eyeD3 on files that outputs garbage for title works fine.
Has anyone met with same problem? What could be the cause