diff options
author | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-14 13:04:35 +0000 |
---|---|---|
committer | albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-14 13:04:35 +0000 |
commit | 2462f728286867bd4928cf240db54d10f244f206 (patch) | |
tree | 7aa9aa83c35ca60ccd12df536084a2f2d488f38e /libmpdemux/mp3_hdr.c | |
parent | acab37105d07acf4067420b57a305ca2d65789d6 (diff) | |
download | mpv-2462f728286867bd4928cf240db54d10f244f206.tar.bz2 mpv-2462f728286867bd4928cf240db54d10f244f206.tar.xz |
Audio file demuxer. Extended version for demuxer info.
genres.h come from id3edit of servex@servex.yi.org found
at http://id3edit.sourceforge.net/
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4695 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/mp3_hdr.c')
-rw-r--r-- | libmpdemux/mp3_hdr.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libmpdemux/mp3_hdr.c b/libmpdemux/mp3_hdr.c index 180c0c6cc3..b2ac948b5b 100644 --- a/libmpdemux/mp3_hdr.c +++ b/libmpdemux/mp3_hdr.c @@ -1,6 +1,7 @@ #include <stdio.h> #include "config.h" +#include "../mp_msg.h" //----------------------- mp3 audio frame header parser ----------------------- @@ -32,12 +33,15 @@ int mp_decode_mp3_header(unsigned char* hbuf){ // head_check: if( (newhead & 0xffe00000) != 0xffe00000 || (newhead & 0x0000fc00) == 0x0000fc00){ - printf("head_check failed\n"); + mp_msg(MSGT_DEMUXER,MSGL_DBG2,"head_check failed\n"); return -1; } #endif - if((4-((newhead>>17)&3))!=3){ printf("not layer-3\n"); return -1;} + if((4-((newhead>>17)&3))!=3){ + mp_msg(MSGT_DEMUXER,MSGL_DBG2,"not layer-3\n"); + return -1; + } if( newhead & ((long)1<<20) ) { lsf = (newhead & ((long)1<<19)) ? 0x0 : 0x1; @@ -53,7 +57,7 @@ int mp_decode_mp3_header(unsigned char* hbuf){ sampling_frequency = ((newhead>>10)&0x3) + (lsf*3); if(sampling_frequency>8){ - printf("invalid sampling_frequency\n"); + mp_msg(MSGT_DEMUXER,MSGL_DBG2,"invalid sampling_frequency\n"); return -1; // valid: 0..8 } @@ -70,7 +74,7 @@ int mp_decode_mp3_header(unsigned char* hbuf){ stereo = ( (((newhead>>6)&0x3)) == 3) ? 1 : 2; if(!bitrate_index){ - fprintf(stderr,"Free format not supported.\n"); + mp_msg(MSGT_DEMUXER,MSGL_DBG2,"Free format not supported.\n"); return -1; } |