# HG changeset patch # User reimar # Date 1113857494 0 # Node ID db6286839af79823b38917b66b8277e870cfc4a3 # Parent 47027be213b2d7a2f3b8570e91e4102ee318df73 Fix MP3 detection (list of found MP3 headers was not kep sorted). Also remove code that only fixed the symptoms. diff -r 47027be213b2 -r db6286839af7 libmpdemux/demux_audio.c --- a/libmpdemux/demux_audio.c Mon Apr 18 20:13:43 2005 +0000 +++ b/libmpdemux/demux_audio.c Mon Apr 18 20:51:34 2005 +0000 @@ -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;