Skip to content

Commit

Permalink
recognise MP3 Xing headers with 'Info' magic
Browse files Browse the repository at this point in the history
The header is the same, but used for CBR files by some encoders.
  • Loading branch information
NetNerd authored Jan 31, 2019
1 parent 12e02fb commit 0981bda
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions NAudio/FileFormats/Mp3/XingHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ public static XingHeader LoadXingHeader(Mp3Frame frame)
xingHeader.startOffset = offset;
offset += 4;
}
else if ((frame.RawData[offset + 0] == 'I') &&
(frame.RawData[offset + 1] == 'n') &&
(frame.RawData[offset + 2] == 'f') &&
(frame.RawData[offset + 3] == 'o'))
{
xingHeader.startOffset = offset;
offset += 4;
}
else
{
return null;
Expand Down

0 comments on commit 0981bda

Please sign in to comment.