floatingpoint exception in mp3 plugin

Message ID fqsvop$9qf$1@video.local.muempf.de
State New
Headers

Commit Message

Stefan Huelswitt March 8, 2008, 3:04 a.m. UTC
  On 02 Mar 2008 Halim Sahin <halim.sahin@t-online.de> wrote:

Hi,

> Program terminated with signal 8, Arithmetic exception.
> #0  0xb7e6b8ce in __udivdi3 () from /lib/libgcc_s.so.1
> (gdb) bt
> #0  0xb7e6b8ce in __udivdi3 () from /lib/libgcc_s.so.1
> #1  0xb71d5099 in cSndInfo::DoScan (this=0x88290fc, KeepOpen=true)
>     at decoder-snd.c:848

Appearently a division by zero. This patch should fix it
temporarily:



But I would like to find the cause of the problem.
The problem seems to be that libsndfile returns a length of 0
frames. Could you please identify which file actualy causes the
crash? I don't think that it's related to the non-audio files.
Most probably one of the wav files.

Regards.
  

Patch

diff -r 710f847b02af decoder-snd.c
--- a/decoder-snd.c     Thu Jan 31 22:31:09 2008 +0100
+++ b/decoder-snd.c     Sat Mar 08 03:59:57 2008 +0100
@@ -845,7 +845,7 @@  bool cSndInfo::DoScan(bool KeepOpen)
   Channels=file->sfi.channels;
   ChMode=Channels>1 ? 3:0;
   Total=Frames/SampleFreq;
-  Bitrate=file->Filesize*8/Total; //XXX SampleFreq*Channels*file->sfi.pcmbitwidth;
+  Bitrate=Total ? file->Filesize*8/Total : 0; //XXX SampleFreq*Channels*file->sfi.pcmbitwidth;
   DecoderID=DEC_SND;
 
   InfoDone();