[Mplayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.3,1.4

Alban Bedel CVS albeu at mplayer.dev.hu
Fri Feb 15 17:48:29 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv21241/libmpdemux

Modified Files:
	demux_audio.c 
Log Message:
We should skip exactly the first frame on mp3 files.
Should correct many badly detected file, decoder crash, etc


Index: demux_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- demux_audio.c	15 Feb 2002 00:16:21 -0000	1.3
+++ demux_audio.c	15 Feb 2002 16:48:25 -0000	1.4
@@ -66,7 +66,7 @@
     } else if( hdr[0] == 'f' && hdr[1] == 'm' && hdr[2] == 't' && hdr[3] == ' ' ) {
       frmt = WAV;
       break;      
-    } else if(mp_decode_mp3_header(hdr) > 0) {
+    } else if((n = mp_decode_mp3_header(hdr)) > 0) {
       frmt = MP3;
       break;
     }
@@ -84,7 +84,7 @@
   switch(frmt) {
   case MP3:
     sh_audio->format = 0x55;
-    demuxer->movi_start = st_pos-3;
+    demuxer->movi_start = st_pos-HDR_SIZE+n;
     for(n = 0; n < 5 ; n++) {
       pos = mp_decode_mp3_header(hdr);
       if(pos < 0)
@@ -160,7 +160,6 @@
   priv = (da_priv_t*)malloc(sizeof(da_priv_t));
   priv->frmt = frmt;
   demuxer->priv = priv;
-//  demuxer->movi_start = st_pos;
   demuxer->audio->id = 0;
   demuxer->audio->sh = sh_audio;
   sh_audio->ds = demuxer->audio;




More information about the MPlayer-cvslog mailing list