summaryrefslogtreecommitdiffstats
path: root/libmpdemux/mp3_hdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux/mp3_hdr.c')
-rw-r--r--libmpdemux/mp3_hdr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpdemux/mp3_hdr.c b/libmpdemux/mp3_hdr.c
index 78ed2fc0a1..fd0b1537f6 100644
--- a/libmpdemux/mp3_hdr.c
+++ b/libmpdemux/mp3_hdr.c
@@ -31,7 +31,7 @@ int mp_mp3_get_lsf(unsigned char* hbuf){
/*
* 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 @@ int mp_decode_mp3_header(unsigned char* hbuf){
framesize += padding;
// if(framesize<=0 || framesize>MAXFRAMESIZE) return FALSE;
+ if(srate) *srate = freqs[sampling_frequency];
+ if(chans) *chans = stereo;
return framesize;
}