[MPlayer-dev-eng] Re: [PATCH] don't skip first mp3 frame

Michael Behrisch behrisch at informatik.hu-berlin.de
Wed Dec 1 12:46:19 CET 2004


On Thu, Oct 21, 2004 at 01:05:08PM -0400, D Richard Felker III wrote:
> On Thu, Oct 21, 2004 at 06:36:08PM +0200, Reimar Döffinger wrote:
> > > > See libmpcodecs/ad_mp3lib.c, line 49. I think there were/are some broken
> > > > MP3 encoders that create only trash for the first frame or something
> > > > like that...
> > > 
> > > no, the idiotic demuxer was starting at the wrong place in the file
> > > making the decoder see the wrong data as the "first frame"... there's
> > > no other decoder that has to discard the first frame when playing
> > > mp3s, so mplayer shouldn't have to do it either...
> > 
> > So the questions is: Does the demuxer now work correctly? Should this be
> > removed?
> 
> afaik, yes, the patch was committed. i'm not positive though..

The demuxer works (at least for me). I also vote for removing
the code which kills the first frame (patch attached).

Michael
-------------- next part --------------
Index: libmpcodecs/ad_mp3lib.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_mp3lib.c,v
retrieving revision 1.7
diff -u -r1.7 ad_mp3lib.c
--- libmpcodecs/ad_mp3lib.c	21 Sep 2004 20:34:46 -0000	1.7
+++ libmpcodecs/ad_mp3lib.c	1 Dec 2004 11:44:42 -0000
@@ -46,7 +46,6 @@
   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-dev-eng mailing list