[Mplayer-dev-eng] sigfpe in resync_audio + patch

pl p_l at tfz.net
Tue Jun 19 22:09:37 CEST 2001


Hi,

I've sometimes the following error when seeking some divx files :
 "MPlayer interrupted by signal 8 in module: resync_audio"

In my case, it's caused by a division by 0 in mp3lib/sr1.c.

The following patch should workaround it.
I've only tested the second part of the patch so the 
first @@ is only supposed to fix a wannabe bug.

--- sr1.c~      Tue Jun 19 22:02:01 2001
+++ sr1.c       Tue Jun 19 22:01:38 2001
@@ -218,6 +218,8 @@
     MP3_bitrate=tabsel_123[fr->lsf][1][fr->bitrate_index];
     MP3_samplerate=freqs[fr->sampling_frequency];
     fr->framesize = (long) MP3_bitrate * 144000;
+    if (MP3_samplerate==0)
+        return FALSE;
     fr->framesize /= MP3_samplerate;
     MP3_framesize=fr->framesize;
     fr->framesize += fr->padding - 4;
@@ -232,6 +234,8 @@
     MP3_bitrate=tabsel_123[fr->lsf][2][fr->bitrate_index];
     MP3_samplerate=freqs[fr->sampling_frequency];
     fr->framesize  = (long) MP3_bitrate * 144000;
+    if (MP3_samplerate==0)
+        return FALSE;
     fr->framesize /= MP3_samplerate<<(fr->lsf);
     MP3_framesize=fr->framesize;
     fr->framesize += fr->padding - 4;

--
pl

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list