[MPlayer-dev-eng] Re: [PATCH] don't skip first mp3 frame
Michael Behrisch
behrisch at informatik.hu-berlin.de
Wed Jun 9 14:03:45 CEST 2004
On Tue, Jun 08, 2004 at 04:59:35PM -0400, D Richard Felker III wrote:
> On Tue, Jun 08, 2004 at 09:19:55PM +0200, Michael Behrisch wrote:
> >
> > I would rather have You apply my patch, which I sent several times
> > to Albeu (even to his private mail) but he did not answer.
> > It checks better for valid mp3. It does clean up the double removal
> > of the first frame (in demux_audio and mp3lib) and if you wish
> > I can modify the patch such that it also removes the first
> > frame skipping in mp3lib.
>
> Does anyone else have comments on this patch? Can you explain why it's
> better than the other one?
IMHO the current demux_audio is broken or at least weird. Look at the while
loop which encloses the detection of the type of audio. It terminates
according to some "n" which never gets incremented. Thus the loop will
possibly read the whole file. Furthermore files which start with a header
that makes them look like mp3 are labelled mp3 and maybe with wrong frequency
etc. The real check (for six consecutive valid headers) is done after the loop
which results only in abortion if it fails (while one could easily go on
if the check would be made earlier as with my patch).
Nehal's patch does no care about this stuff it simply changes demuxer->movie_start
to point to the first header instead of the second (which my patch does as well)
and removes this skipping of first frame in mp3lib (which my patch does not do (yet)).
Michael
More information about the MPlayer-dev-eng
mailing list