movieplayer: fix possible endless loop in UpdatePosition() function

Origin commit data
------------------
Commit: d403c95aec
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-16 (Tue, 16 Jan 2018)

Origin message was:
------------------
- movieplayer: fix possible endless loop in UpdatePosition() function
This commit is contained in:
vanhofen
2018-01-16 10:28:56 +01:00
parent a977f2dd64
commit 7fc214dc96

View File

@@ -2568,8 +2568,10 @@ void CMoviePlayerGui::UpdatePosition()
{
usleep(10000);
cnt++;
if (cnt > 5)
break;
}
while ((!playback->GetPosition(position, duration)) || (cnt <= 5));
while (!playback->GetPosition(position, duration));
if (duration > 100)
file_prozent = (unsigned char) (position / (duration / 100));