cactusjukebox: Fix floating point-to-string conversion error
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9254 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
00b7a55956
commit
0db0bf4880
@ -18,7 +18,7 @@
|
||||
<AutoIncrementBuild Value="True"/>
|
||||
<MinorVersionNr Value="3"/>
|
||||
<RevisionNr Value="5"/>
|
||||
<BuildNr Value="755"/>
|
||||
<BuildNr Value="758"/>
|
||||
<StringTable ProductVersion="0.3.5.737"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="3">
|
||||
|
@ -364,6 +364,7 @@ var tmps: string;
|
||||
i:integer;
|
||||
time: real;
|
||||
begin
|
||||
result := -1;
|
||||
if GetMPlayerPlaying then begin
|
||||
i:=0;
|
||||
repeat begin
|
||||
@ -375,11 +376,13 @@ begin
|
||||
until (pos('time_pos', tmps)>0) or (i>=3);
|
||||
i:=LastDelimiter('=', tmps);
|
||||
if i > 0 then begin
|
||||
time:= StrToFloat(Copy(tmps, i+1, Length(tmps)), MPlayerFormatSettings);
|
||||
time:=time*1000;
|
||||
result:=round(time);
|
||||
end else result:=-1;
|
||||
end else result:=-1;
|
||||
if TryStrToFloat(Copy(tmps, i+1, Length(tmps)), time, MPlayerFormatSettings) then
|
||||
begin
|
||||
time:=time*1000;
|
||||
result:=round(time);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
Loading…
Reference in New Issue
Block a user