changeset 34835:d59e91d7e4b4

Remove unused code from mp_get_mp3_header.
author reimar
date Fri, 18 May 2012 20:52:12 +0000
parents 2292b00862af
children 34c835d22130
files libmpdemux/mp3_hdr.c
diffstat 1 files changed, 1 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/mp3_hdr.c	Fri May 18 18:34:26 2012 +0000
+++ b/libmpdemux/mp3_hdr.c	Fri May 18 20:52:12 2012 +0000
@@ -43,7 +43,7 @@
  * return frame size or -1 (bad frame)
  */
 int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* srate, int* spf, int* mpa_layer, int* br){
-    int stereo,ssize,lsf,framesize,padding,bitrate_index,sampling_frequency, divisor;
+    int stereo,lsf,framesize,padding,bitrate_index,sampling_frequency, divisor;
     int bitrate;
     int layer;
     static const int mult[3] = { 12000, 144000, 144000 };
@@ -53,8 +53,6 @@
       hbuf[2] <<  8 |
       hbuf[3];
 
-//    printf("head=0x%08X\n",newhead);
-
     // head_check:
     if( (newhead & 0xffe00000) != 0xffe00000 ){
       mp_msg(MSGT_DEMUXER,MSGL_DBG2,"head_check failed\n");
@@ -83,30 +81,11 @@
       sampling_frequency += 6;
     }
 
-//    crc = ((newhead>>16)&0x1)^0x1;
     bitrate_index = (newhead>>12)&0xf;  // valid: 1..14
     padding   = (newhead>>9)&0x1;
-//    fr->extension = (newhead>>8)&0x1;
-//    fr->mode      = (newhead>>6)&0x3;
-//    fr->mode_ext  = (newhead>>4)&0x3;
-//    fr->copyright = (newhead>>3)&0x1;
-//    fr->original  = (newhead>>2)&0x1;
-//    fr->emphasis  = newhead & 0x3;
 
     stereo    = ( ((newhead>>6)&0x3) == 3) ? 1 : 2;
 
-// !checked later through tabsel_123[]!
-//    if(!bitrate_index || bitrate_index==15){
-//      mp_msg(MSGT_DEMUXER,MSGL_DBG2,"Free format not supported.\n");
-//      return -1;
-//    }
-
-    if(lsf)
-      ssize = (stereo == 1) ? 9 : 17;
-    else
-      ssize = (stereo == 1) ? 17 : 32;
-    if(!(newhead & (1 << 16))) ssize += 2; // CRC
-
     bitrate = tabsel_123[lsf][layer-1][bitrate_index];
     framesize = bitrate * mult[layer-1];
 
@@ -123,7 +102,6 @@
     if(layer==1)
       framesize *= 4;
 
-//    if(framesize<=0 || framesize>MAXFRAMESIZE) return FALSE;
     if(srate)
       *srate = freqs[sampling_frequency];
     if(spf) {