[Mplayer-cvslog] CVS: main/libmpcodecs ad_mp3lib.c,1.5,1.6

Alex Beregszaszi alex at mplayerhq.hu
Fri Aug 15 14:35:33 CEST 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv27670

Modified Files:
	ad_mp3lib.c 
Log Message:
Workaround: skip first mp3 frame, that mostly contains trashed data. This fixes several buggy/mistdetected files. Idea by Arpi.

Index: ad_mp3lib.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_mp3lib.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ad_mp3lib.c	1 Nov 2002 16:40:07 -0000	1.5
+++ ad_mp3lib.c	15 Aug 2003 12:35:08 -0000	1.6
@@ -46,6 +46,7 @@
   MP3_Init();
 #endif
   MP3_samplerate=MP3_channels=0;
+  MP3_DecodeFrame(NULL,-2); // FIXME: skip the first frame (often trashed)
   sh->a_buffer_len=MP3_DecodeFrame(sh->a_buffer,-1);
   if(!sh->a_buffer_len) return 0; // unsupported layer/format
   sh->channels=2; // hack



More information about the MPlayer-cvslog mailing list