[MPlayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.32,1.33

Rich Felker dalias at aerifal.cx
Mon Apr 18 05:47:08 CEST 2005


On Sun, Apr 17, 2005 at 09:32:49PM +0200, Reimar Döffinger wrote:
> Hi,
> On Sun, Apr 17, 2005 at 07:08:57PM +0200, Nico Sabbi CVS wrote:
> > Log Message:
> > skip framelen-4 bytes after having successfully detected an mpeg audio frame
> > 
> > Index: demux_audio.c
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
> > retrieving revision 1.32
> > retrieving revision 1.33
> > diff -u -r1.32 -r1.33
> > --- demux_audio.c	17 Apr 2005 09:42:51 -0000	1.32
> > +++ demux_audio.c	17 Apr 2005 17:08:55 -0000	1.33
> > @@ -158,6 +158,7 @@
> >        frmt = WAV;
> >        break;      
> >      } else if((mp3_flen = mp_get_mp3_header(hdr,&mp3_chans,&mp3_freq,&mpa_spf,&mpa_layer)) > 0) {
> > +      stream_skip(s, mp3_flen - HDR_SIZE);
> 
> 
> Wtf?? This is exactly what my patch back then was supposed to _not_ do!
> You do not know if this really is a valid MP3 header or just some noise,
> so this skip might actually jump over the first seconds of audio or so.

Seconds? More like frames, i.e. a few 1/40 of a second.

> It's not quite as bad as before where some files would not play at all,
> but still...

Well your code was definitely broken. Not only was it incredibly slow;
I have a perfectly valid cbr 128kbit mp3 file that WILL NOT PLAY with
your code due to it making up artificial mp1 headers in the middle of
the mp3...

Rich




More information about the MPlayer-cvslog mailing list