[vlc-commits] MP3: support free format

Jean-Baptiste Kempf git at videolan.org
Wed May 30 13:57:58 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed May 30 13:57:03 2012 +0200| [de7ab0663de8f6faa1c8c513b0e080cb274879a0] | committer: Jean-Baptiste Kempf

MP3: support free format

libmad Decoder is necessary for that.

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

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

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index e3db290..87dbf17 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -633,9 +633,9 @@ static int MpgaCheckSync( const uint8_t *p_peek )
     uint32_t h = GetDWBE( p_peek );
 
     if( ((( h >> 21 )&0x07FF) != 0x07FF )   /* header sync */
+        || (((h >> 19)&0x03) == 1 )         /* valid version ID ? */
         || (((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