summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-24 00:49:06 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-24 00:49:06 +0000
commitcb4a546f54ffc1d7bb393d8fcc544f8d078de670 (patch)
tree88663635ab8131c9b381c55615f44d5382809fe6 /libmpdemux
parentd6b84b02ef0b36ed28d4f5afc202c892bf256424 (diff)
downloadmpv-cb4a546f54ffc1d7bb393d8fcc544f8d078de670.tar.bz2
mpv-cb4a546f54ffc1d7bb393d8fcc544f8d078de670.tar.xz
mp_mp3_get_lsf() added - to get decomp. frame size
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5807 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/mp3_hdr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libmpdemux/mp3_hdr.c b/libmpdemux/mp3_hdr.c
index b2ac948b5b..78ed2fc0a1 100644
--- a/libmpdemux/mp3_hdr.c
+++ b/libmpdemux/mp3_hdr.c
@@ -16,6 +16,18 @@ static int tabsel_123[2][3][16] = {
};
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)
*/