From 3a5e866d17d826b41ff72b74fababc019b8d4b39 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 16 Jan 2018 10:28:56 +0100 Subject: [PATCH] - movieplayer: fix possible endless loop in UpdatePosition() function Signed-off-by: Thilo Graf --- src/gui/movieplayer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index aec9437dd..916215844 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -2561,8 +2561,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));