annotate libmpdemux/mp3_hdr.h @ 12305:e6c9f2cda7d9

Update
author rtognimp
date Mon, 26 Apr 2004 20:11:33 +0000
parents e29f95ed5d36
children 980910eb6f0c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4710
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
1
6763
e29f95ed5d36 Fix vbr muxing and win32 codec crash on init
albeu
parents: 4710
diff changeset
2 int mp_get_mp3_header(unsigned char* hbuf,int* chans, int* freq);
e29f95ed5d36 Fix vbr muxing and win32 codec crash on init
albeu
parents: 4710
diff changeset
3
e29f95ed5d36 Fix vbr muxing and win32 codec crash on init
albeu
parents: 4710
diff changeset
4 #define mp_decode_mp3_header(hbuf) mp_get_mp3_header(hbuf,NULL,NULL)
4710
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
5
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
6 static inline int mp_check_mp3_header(unsigned int head){
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
7 if( (head & 0x0000e0ff) != 0x0000e0ff ||
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
8 (head & 0x00fc0000) == 0x00fc0000) return 0;
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
9 if(mp_decode_mp3_header((unsigned char*)(&head))<=0) return 0;
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
10 return 1;
701976d7a7d1 fast header checker added
arpi
parents:
diff changeset
11 }