ACS crashes when playing a certain file
Original Reporter info from Mantis: bstreit
-
Reporter name: Bernhard
Original Reporter info from Mantis: bstreit
- Reporter name: Bernhard
Description:
Hello,
I get a run error (200) when I try to play a certain, short mp3 file with the ACS lib. I've attached that file.
I found that the error occurs in this file:
In the procedure "procedure TDSIn.OpenFile;", almost at the end of the procedure, you have
...
if fDuration = 0 then exit;
FSize :=(FDuration div 10000000) *
FSR *
FChan *
FBPS div 8;
FSeekScale := FDuration div FSize;
...
And when the program crashes, it stops at the last div statement.
I found that I can make it work by inserting another check if fsize is zero:
...
if fDuration = 0 then exit;
FSize :=(FDuration div 10000000) *
FSR *
FChan *
FBPS div 8;
if fsize=0 then exit;
FSeekScale := FDuration div FSize;
...
It is working now, but, to be honest, I have no idea how the code works, and if my insertion was "legal".
Bernhard
Mantis conversion info:
- Mantis ID: 14568
- Version: 0.9.29 (SVN)
- Monitored by: » bstreit (Bernhard)