summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index b4472129c5..53f1aa6c83 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1762,7 +1762,11 @@ if(rel_seek_secs || abs_seek_pos){
if(len>0){
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=0;
- vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len;
+ vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len;
+ if (vo_osd_progbar_value<0)
+ vo_osd_progbar_value=0;
+ else if (vo_osd_progbar_value>255)
+ vo_osd_progbar_value=255;
}
}
#endif