diff libmpdemux/demux_audio.c @ 15205:19243f85e164

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.
author rfelker
date Sun, 17 Apr 2005 17:17:52 +0000
parents 49b46377b668
children db6286839af7
line wrap: on
line diff
--- 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;