[MPlayer-cvslog] r34918 - trunk/libmpdemux/mp3_hdr.c

reimar subversion at mplayerhq.hu
Fri May 18 19:18:32 CEST 2012


Author: reimar
Date: Fri May 18 19:18:31 2012
New Revision: 34918

Log:
Use more appropriate types.

Modified:
   trunk/libmpdemux/mp3_hdr.c

Modified: trunk/libmpdemux/mp3_hdr.c
==============================================================================
--- trunk/libmpdemux/mp3_hdr.c	Fri May 18 19:16:35 2012	(r34917)
+++ trunk/libmpdemux/mp3_hdr.c	Fri May 18 19:18:31 2012	(r34918)
@@ -47,7 +47,7 @@ int mp_get_mp3_header(unsigned char* hbu
     int bitrate;
     int layer;
     static const int mult[3] = { 12000, 144000, 144000 };
-    unsigned long newhead =
+    uint32_t newhead =
       hbuf[0] << 24 |
       hbuf[1] << 16 |
       hbuf[2] <<  8 |
@@ -73,9 +73,9 @@ int mp_get_mp3_header(unsigned char* hbu
 	return -1;
     }
 
-    if( newhead & ((long)1<<20) ) {
+    if( newhead & (1<<20) ) {
       // MPEG 1.0 (lsf==0) or MPEG 2.0 (lsf==1)
-      lsf = (newhead & ((long)1<<19)) ? 0x0 : 0x1;
+      lsf = (newhead & (1<<19)) ? 0x0 : 0x1;
       sampling_frequency += (lsf*3);
     } else {
       // MPEG 2.5


More information about the MPlayer-cvslog mailing list