From b252de089662efcdb5932851c78cbbb98bb7fe48 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 4 Dec 2012 13:50:11 +0400 Subject: [PATCH] gui/movieplayer.cpp: dont auto-stop, if duration or position invalid --- 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 d7e02a6ef..391c51897 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -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)