diff libmpdemux/mp3_hdr.c @ 6763:e29f95ed5d36

Fix vbr muxing and win32 codec crash on init
author albeu
date Sun, 21 Jul 2002 14:36:33 +0000
parents ef85f6de947c
children 5a276890cec4
line wrap: on
line diff
--- a/libmpdemux/mp3_hdr.c	Sun Jul 21 12:13:40 2002 +0000
+++ b/libmpdemux/mp3_hdr.c	Sun Jul 21 14:36:33 2002 +0000
@@ -31,7 +31,7 @@
 /*
  * return frame size or -1 (bad frame)
  */
-int mp_decode_mp3_header(unsigned char* hbuf){
+int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* srate){
     int stereo,ssize,crc,lsf,mpeg25,framesize,padding,bitrate_index,sampling_frequency;
     unsigned long newhead = 
       hbuf[0] << 24 |
@@ -101,6 +101,8 @@
     framesize += padding;
 
 //    if(framesize<=0 || framesize>MAXFRAMESIZE) return FALSE;
+    if(srate) *srate = freqs[sampling_frequency];
+    if(chans) *chans = stereo;
 
     return framesize;
 }