Commit df908f83 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MP3: fix validation of headers

Should fix free format playback

Partial backport of de7ab0663
parent 27921c39
...@@ -634,8 +634,7 @@ static int MpgaCheckSync( const uint8_t *p_peek ) ...@@ -634,8 +634,7 @@ static int MpgaCheckSync( const uint8_t *p_peek )
if( ((( h >> 21 )&0x07FF) != 0x07FF ) /* header sync */ if( ((( h >> 21 )&0x07FF) != 0x07FF ) /* header sync */
|| (((h >> 17)&0x03) == 0 ) /* valid layer ?*/ || (((h >> 17)&0x03) == 0 ) /* valid layer ?*/
|| (((h >> 12)&0x0F) == 0x0F ) || (((h >> 12)&0x0F) == 0x0F ) /* valid bitrate ? */
|| (((h >> 12)&0x0F) == 0x00 ) /* valid bitrate ? */
|| (((h >> 10) & 0x03) == 0x03 ) /* valide sampling freq ? */ || (((h >> 10) & 0x03) == 0x03 ) /* valide sampling freq ? */
|| ((h & 0x03) == 0x02 )) /* valid emphasis ? */ || ((h & 0x03) == 0x02 )) /* valid emphasis ? */
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment