From: Tsuda Kageyu Date: Thu, 7 Jan 2016 17:30:17 +0000 (+0900) Subject: Another workaround for broken MPEG headers. X-Git-Tag: v1.11beta~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1254534ed4cba60d170145c026bd6ed28a6796a7;p=taglib Another workaround for broken MPEG headers. --- diff --git a/taglib/mpeg/mpegutils.h b/taglib/mpeg/mpegutils.h index 78cee280..5a7e0e6a 100644 --- a/taglib/mpeg/mpegutils.h +++ b/taglib/mpeg/mpegutils.h @@ -48,7 +48,9 @@ namespace TagLib inline bool secondSynchByte(unsigned char byte) { - return ((byte & 0xE0) == 0xE0); + // 0xFF is possible in theory, but it's very unlikely be a header. + + return (byte != 0xFF && ((byte & 0xE0) == 0xE0)); } }