- movieplayer: fix possible endless loop in UpdatePosition() function

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-01-16 10:28:56 +01:00
committed by Thilo Graf
parent dcaddc563d
commit 3a5e866d17

View File

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