Mercurial > mplayer.hg
changeset 15215:db6286839af7
Fix MP3 detection (list of found MP3 headers was not kep sorted).
Also remove code that only fixed the symptoms.
author | reimar |
---|---|
date | Mon, 18 Apr 2005 20:51:34 +0000 |
parents | 47027be213b2 |
children | 15053e88fa42 |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;