Skip to content

Commit

Permalink
Merge pull request xbmc#21808 from CastagnaIT/fix_time_variable
Browse files Browse the repository at this point in the history
[Subtitles][WebVTT] Fixed "seconds" variable type to double
  • Loading branch information
enen92 authored Sep 5, 2022
2 parents 924ab8b + 2771171 commit ac98a52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/cores/VideoPlayer/DVDSubtitles/webvtt/WebVTTHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1143,8 +1143,8 @@ double CWebVTTHandler::GetTimeFromRegexTS(CRegExp& regex, int indexStart /* = 1
{
int sHours = 0;
if (!regex.GetMatch(indexStart).empty())
sHours = std::stoi(regex.GetMatch(indexStart).c_str());
int sMinutes = std::stoi(regex.GetMatch(indexStart + 1).c_str());
int sSeconds = std::atof(regex.GetMatch(indexStart + 2).c_str());
sHours = std::stoi(regex.GetMatch(indexStart));
int sMinutes = std::stoi(regex.GetMatch(indexStart + 1));
double sSeconds = std::stod(regex.GetMatch(indexStart + 2));
return (static_cast<double>(sHours * 3600 + sMinutes * 60) + sSeconds) * DVD_TIME_BASE;
}

0 comments on commit ac98a52

Please sign in to comment.