Mercurial > mplayer.hg
changeset 5806:ef85f6de947c
mp_mp3_get_lsf() added - to get decomp. frame size
author | arpi |
---|---|
date | Wed, 24 Apr 2002 00:49:06 +0000 |
parents | c63b519bd183 |
children | d4bc84e7c0ad |
files | libmpdemux/mp3_hdr.c |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/mp3_hdr.c Wed Apr 24 00:38:04 2002 +0000 +++ b/libmpdemux/mp3_hdr.c Wed Apr 24 00:49:06 2002 +0000 @@ -16,6 +16,18 @@ }; static long freqs[9] = { 44100, 48000, 32000, 22050, 24000, 16000 , 11025 , 12000 , 8000 }; +int mp_mp3_get_lsf(unsigned char* hbuf){ + unsigned long newhead = + hbuf[0] << 24 | + hbuf[1] << 16 | + hbuf[2] << 8 | + hbuf[3]; + if( newhead & ((long)1<<20) ) { + return (newhead & ((long)1<<19)) ? 0x0 : 0x1; + } + return 1; +} + /* * return frame size or -1 (bad frame) */