diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-07-21 14:36:33 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-07-21 14:36:33 +0000 |
commit | 63b5875bb5741b85042057b1d86f8d528171668b (patch) | |
tree | 50b9afcdb0a24875059c6fefe26b89053a0b80d8 /libmpdemux/mp3_hdr.c | |
parent | 8b9de50aff24400042fbf1fc50ce43f69cf207c7 (diff) | |
download | mpv-63b5875bb5741b85042057b1d86f8d528171668b.tar.bz2 mpv-63b5875bb5741b85042057b1d86f8d528171668b.tar.xz |
Fix vbr muxing and win32 codec crash on init
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6764 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/mp3_hdr.c')
-rw-r--r-- | libmpdemux/mp3_hdr.c | 4 |
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; } |