# HG changeset patch # User rfelker # Date 1113758272 0 # Node ID 19243f85e1644bfa519a9fac2f788b6b8b681d7c # Parent 49b46377b668e53735bc07c8908bf5ef7316ea7a nico partially fixed the bug i reported; here's the rest of the fix. basically demux_audio was mixing data in its header buffer in a bogus manner, whereby it could sometimes "make up" valid mpeg headers where no such header actually occurred in the file. it should be correct now. btw these changes also fix the bug where mplayer reports huge initial cpu usage for sound when playing mp3 files. diff -r 49b46377b668 -r 19243f85e164 libmpdemux/demux_audio.c --- a/libmpdemux/demux_audio.c Sun Apr 17 17:08:55 2005 +0000 +++ b/libmpdemux/demux_audio.c Sun Apr 17 17:17:52 2005 +0000 @@ -159,6 +159,7 @@ 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;