[vlc-commits] MP3: fix validation of headers

Jean-Baptiste Kempf git at videolan.org
Sun Jun 3 23:45:47 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun  3 23:40:37 2012 +0200| [df908f831a56d50676969f787d1910ef24cf5143] | committer: Jean-Baptiste Kempf

MP3: fix validation of headers

Should fix free format playback

Partial backport of de7ab0663

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=df908f831a56d50676969f787d1910ef24cf5143
---

 modules/demux/mpeg/es.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index e3db290..6f3c4e9 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -634,8 +634,7 @@ static int MpgaCheckSync( const uint8_t *p_peek )
 
     if( ((( h >> 21 )&0x07FF) != 0x07FF )   /* header sync */
         || (((h >> 17)&0x03) == 0 )         /* valid layer ?*/
-        || (((h >> 12)&0x0F) == 0x0F )
-        || (((h >> 12)&0x0F) == 0x00 )      /* valid bitrate ? */
+        || (((h >> 12)&0x0F) == 0x0F )      /* valid bitrate ? */
         || (((h >> 10) & 0x03) == 0x03 )    /* valide sampling freq ? */
         || ((h & 0x03) == 0x02 ))           /* valid emphasis ? */
     {



More information about the vlc-commits mailing list