gui/movieplayer.cpp: dont auto-stop, if duration or position invalid

Origin commit data
------------------
Commit: b252de0896
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-12-04 (Tue, 04 Dec 2012)
This commit is contained in:
[CST] Focus
2012-12-04 13:50:11 +04:00
parent 93026dca54
commit 45e775b96d

View File

@@ -500,7 +500,9 @@ void CMoviePlayerGui::PlayFile(void)
#ifdef DEBUG
printf("CMoviePlayerGui::PlayFile: speed %d position %d duration %d (%d, %d%%)\n", speed, position, duration, duration-position, file_prozent);
#endif
if (duration - position < 1000 && !timeshift)
/* in case ffmpeg report incorrect values */
int posdiff = duration - position;
if ((posdiff > 0) && (posdiff < 1000) && !timeshift)
{
/* 10 seconds after end-of-file, stop */
if (++eof > 10)