summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-14 23:41:00 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-14 23:41:00 +0000
commit360bb11537ce9297bf96ca3aa370b7b692d8c00b (patch)
treeb07ab724314810f0680927b9bc2e0581d83f421a /libmpdemux
parent66ebcb8714959a0ed361571dd497f7421a7c0381 (diff)
downloadmpv-360bb11537ce9297bf96ca3aa370b7b692d8c00b.tar.bz2
mpv-360bb11537ce9297bf96ca3aa370b7b692d8c00b.tar.xz
fast header checker added
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4711 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/mp3_hdr.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libmpdemux/mp3_hdr.h b/libmpdemux/mp3_hdr.h
new file mode 100644
index 0000000000..9635760a95
--- /dev/null
+++ b/libmpdemux/mp3_hdr.h
@@ -0,0 +1,9 @@
+
+int mp_decode_mp3_header(unsigned char* hbuf);
+
+static inline int mp_check_mp3_header(unsigned int head){
+ if( (head & 0x0000e0ff) != 0x0000e0ff ||
+ (head & 0x00fc0000) == 0x00fc0000) return 0;
+ if(mp_decode_mp3_header((unsigned char*)(&head))<=0) return 0;
+ return 1;
+}