gui/movieplayer.cpp: fix stop and EOF, if suddenly we get position == duration

This commit is contained in:
[CST] Focus
2014-09-29 18:08:58 +04:00
parent b33247f346
commit 178582afb0

View File

@@ -824,7 +824,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
#endif #endif
/* in case ffmpeg report incorrect values */ /* in case ffmpeg report incorrect values */
int posdiff = duration - position; int posdiff = duration - position;
if ((posdiff > 0) && (posdiff < 2000) && timeshift == TSHIFT_MODE_OFF) if ((posdiff >= 0) && (posdiff < 2000) && timeshift == TSHIFT_MODE_OFF)
{ {
int delay = (filelist_it != filelist.end() || repeat_mode != REPEAT_OFF) ? 5 : 10; int delay = (filelist_it != filelist.end() || repeat_mode != REPEAT_OFF) ? 5 : 10;
if (++eof > delay) { if (++eof > delay) {