[MPlayer-cvslog] CVS: main/libmpdemux demux_audio.c,1.34,1.35

Rich Felker dalias at aerifal.cx
Tue Apr 19 01:38:12 CEST 2005


On Mon, Apr 18, 2005 at 10:51:37PM +0200, Reimar Döffinger CVS wrote:
> CVS change done by Reimar Döffinger CVS
> 
> Update of /cvsroot/mplayer/main/libmpdemux
> In directory mail:/var2/tmp/cvs-serv18385
> 
> Modified Files:
> 	demux_audio.c 
> Log Message:
> Fix MP3 detection (list of found MP3 headers was not kep sorted).
> Also remove code that only fixed the symptoms.
> 
> 
> Index: demux_audio.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
> retrieving revision 1.34
> retrieving revision 1.35
> diff -u -r1.34 -r1.35
> --- demux_audio.c	17 Apr 2005 17:17:52 -0000	1.34
> +++ demux_audio.c	18 Apr 2005 20:51:34 -0000	1.35
> @@ -101,6 +101,9 @@
>      }
>    }
>    if (!in_list) { // does not belong into an existing chain, insert
> +    // find right position to insert to keep sorting
> +    while (*list && (*list)->next_frame_pos <= st_pos + mp3_flen)
> +      list = &((*list)->next);
>      tmp = malloc(sizeof(mp3_hdr_t));
>      tmp->frame_pos = st_pos;
>      tmp->next_frame_pos = st_pos + mp3_flen;
> @@ -158,8 +161,6 @@
>        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);
> -      step = HDR_SIZE;
>        mp3_found = add_mp3_hdr(&mp3_hdrs, st_pos, mp3_chans, mp3_freq, mp3_flen);
>        if (mp3_found) {
>          frmt = MP3;

seems to work...

rich




More information about the MPlayer-cvslog mailing list