floatingpoint exception in mp3 plugin
Commit Message
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.
@@ -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();