I'm trying to read id3 frames and my problem is I can't get full title. When title of mp3 is long, my result is string without end and without first 9 characters. If title of the song is short my result is title without first 9 characters.
struct ID3V2frame
{
char header[4];
char *id3frame[readBytes];
int sizze[4];
}frame;
fseek(file,10,SEEK_SET); // skip id3 header
fread(&frame.header,sizeof(frame),1,file);
readBytes = ((frame.sizze[0] & 127) << 21) |
((frame.sizze[1] & 127) << 14) |
((frame.sizze[2] & 127) << 7) |
(frame.sizze[3] & 127);
fread(&frame.id3frame,sizeof(frame),1,file);
if(strncmp(frame.header,"TIT2", 4) == 0)
printf("%s",frame.id3frame);