mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
movieplayer: fix updateposition loop
This commit is contained in:
@@ -2556,14 +2556,20 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
|||||||
|
|
||||||
void CMoviePlayerGui::UpdatePosition()
|
void CMoviePlayerGui::UpdatePosition()
|
||||||
{
|
{
|
||||||
while (!playback->GetPosition(position, duration)) {
|
int cnt = 0;
|
||||||
if (duration > 100)
|
do
|
||||||
file_prozent = (unsigned char) (position / (duration / 100));
|
{
|
||||||
FileTimeOSD->update(position, duration);
|
usleep(10000);
|
||||||
#ifdef DEBUG
|
cnt++;
|
||||||
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
while ((!playback->GetPosition(position, duration)) || (cnt <= 5));
|
||||||
|
|
||||||
|
if (duration > 100)
|
||||||
|
file_prozent = (unsigned char) (position / (duration / 100));
|
||||||
|
FileTimeOSD->update(position, duration);
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMoviePlayerGui::showHelp()
|
void CMoviePlayerGui::showHelp()
|
||||||
|
Reference in New Issue
Block a user