mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
src/gui/movieplayer.cpp try fix stop play file on file end
This commit is contained in:
@@ -1285,8 +1285,11 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
bool first_start = true;
|
bool first_start = true;
|
||||||
bool update_lcd = true;
|
bool update_lcd = true;
|
||||||
int eof = 0;
|
int eof = 0;
|
||||||
|
int eof2 = 0;
|
||||||
|
int position_tmp = 0;
|
||||||
bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);;
|
bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);;
|
||||||
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
|
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
|
||||||
|
|
||||||
while (playstate >= CMoviePlayerGui::PLAY)
|
while (playstate >= CMoviePlayerGui::PLAY)
|
||||||
{
|
{
|
||||||
if (update_lcd) {
|
if (update_lcd) {
|
||||||
@@ -1320,6 +1323,20 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
|
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
|
||||||
#endif
|
#endif
|
||||||
/* in case ffmpeg report incorrect values */
|
/* in case ffmpeg report incorrect values */
|
||||||
|
if((playstate == CMoviePlayerGui::PLAY) && (speed == 1)){
|
||||||
|
if(position_tmp != position){
|
||||||
|
position_tmp = position ;
|
||||||
|
eof2 = 0;
|
||||||
|
}else{
|
||||||
|
if (++eof2 > 6) {
|
||||||
|
at_eof = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
eof2 = 0;
|
||||||
|
}
|
||||||
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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user