[Mplayer-cvslog] CVS: main/mp3lib sr1.c,1.23,1.24

Arpi of Ize arpi at mplayerhq.hu
Sat Sep 28 04:03:24 CEST 2002


Update of /cvsroot/mplayer/main/mp3lib
In directory mail:/var/tmp.root/cvs-serv17651

Modified Files:
	sr1.c 
Log Message:
layer-1 stream parsing (NOT decoding) support


Index: sr1.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/sr1.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- sr1.c	21 Sep 2002 20:23:49 -0000	1.23
+++ sr1.c	28 Sep 2002 02:03:09 -0000	1.24
@@ -265,7 +265,17 @@
     MP3_framesize=fr->framesize;
     fr->framesize += fr->padding - 4;
     break;
+  case 1:
+//    fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ? (fr->mode_ext<<2)+4 : 32;
+    MP3_bitrate=tabsel_123[fr->lsf][0][fr->bitrate_index];
+    MP3_samplerate=freqs[fr->sampling_frequency];
+    fr->framesize  = (long) MP3_bitrate * 12000;
+    fr->framesize /= MP3_samplerate;
+    MP3_framesize  = fr->framesize;
+    fr->framesize  = ((fr->framesize+fr->padding)<<2)-4;
+    break;
   default:
+    MP3_framesize=fr->framesize=0;
 //    fprintf(stderr,"Sorry, unsupported layer type.\n");
     return 0;
 }
@@ -539,6 +549,9 @@
    switch(fr.lay){
      case 2: do_layer2(&fr,single);break;
      case 3: do_layer3(&fr,single);break;
+     case 1:
+         printf("mp3lib: layer-1 audio not yet supported!\n");
+	 return 4608;
      default:
          return 0;	// unsupported
    }




More information about the MPlayer-cvslog mailing list