[MPlayer-dev-eng] Re: [PATCH] don't skip first mp3 frame
Nehal
nehalmistry at gmx.net
Mon Mar 22 20:55:03 CET 2004
> On Mon, Mar 22, 2004 at 10:24:59AM +0100, Alban Bedel wrote:
> > Hi D Richard Felker III,
> >
> > on Sun, 21 Mar 2004 22:04:49 -0500 you wrote:
> >
> > > On Sun, Mar 21, 2004 at 06:07:50PM -0800, Nehal wrote:
> > > > for some reason, the current code skips the first frame of
> > > > mp3 files (using any decoder), i'm assuming this is a bug
> > > > as i can't see any good reason for this.
> > >
> > > It was added intentionally to avoid hearing pops at the beginning of
> > > some files. Of course this is an incorrect, idiotic fix. 100l to
> > > someone...
> >
> > pops ?? lol it's really not the pb. Way too often the first
> > frame is buggy and initialize mp3lib with totaly wrong parameters.
> > So you end up playing at 11050Hz some nice 48000Hz, etc And that
> > happend with a really significant amount of files :(((
> >
> > A better fix is welcome ;) Anyway in betewen someone changed the
> > ad_mp3lib to skip the first frame. So with mp3 files the first 2
> > valid frames are skipped now.
> >
> > > > this probably isn't noticeable with most files, but i have
> > > > a couple of test cases that have audible sound data in the
> > > > first frame. if someone wants, email me and i'll send you
> > > > the starting part of the files for testing purposes.
> > > >
> > > > please apply the patch that i've attached
> > >
> > > Please send a patch that fixes whatever bug is causing the first frame
> > > to be decoded as a horrible pop in many files, and we'll gladly apply
> > > this patch too.
> >
> > I'll strongly advice a VERY EXTENSIVE testing (including loads of stuff
> > encoded with old encoders) before renableing the decoding of the first
> > frame.
>
> All other apps handle it fine, so it must be a bug in MPlayer, not the
> file. Maybe the first frame of the file is broken, but it's easy to
> detect that it's broken and MPlayer just fails to detect that...
>
> Rich
>
Albeu: skipping the first 2 frames is a bad fix either way.
fixing one bug by adding another is not right. even if it doesn't fix
mp3lib, the first 2 frames should play, otherwise it breaks all
other mp3 decoders (ie, ffmp3) that work fine. if you wanted a
temporary fix, the first 2 frames should have been skipped from
the mp3lib code only.
but it seems everything was fine for me were fixed when i removed
_both_ 2 frame skips, (my patch + comment out ad_mp3lib.c:49,
MP3_DecodeFrame(NULL,-2); ) if anyone has any mp3's that still pop
after this, please send to me (at least the first couple of seconds)
so i can fix.
Nehal
More information about the MPlayer-dev-eng
mailing list