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

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


Author: reimar
Date: Fri May 18 19:14:04 2012
New Revision: 34916

Log:
Return a spf value even when srate is NULL.

Based on patch by Benoît Thébaudeau [benoit thebaudeau advansee com]

Modified:
   trunk/libmpdemux/mp3_hdr.c

Modified: trunk/libmpdemux/mp3_hdr.c
==============================================================================
--- trunk/libmpdemux/mp3_hdr.c	Fri May 18 19:03:09 2012	(r34915)
+++ trunk/libmpdemux/mp3_hdr.c	Fri May 18 19:14:04 2012	(r34916)
@@ -123,19 +123,18 @@ int mp_get_mp3_header(unsigned char* hbu
       framesize += padding;
 
 //    if(framesize<=0 || framesize>MAXFRAMESIZE) return FALSE;
-    if(srate) {
+    if(srate)
       *srate = freqs[sampling_frequency];
       if(spf) {
         if(layer == 1)
 	  *spf = 384;
         else if(layer == 2)
 	  *spf = 1152;
-        else if(*srate < 32000)
+        else if(sampling_frequency > 2) // not 1.0
           *spf = 576;
         else
 	  *spf = 1152;
       }
-    }
     if(mpa_layer) *mpa_layer = layer;
     if(chans) *chans = stereo;
     if(br) *br = bitrate;


More information about the MPlayer-cvslog mailing list