checking range of vo_osd_progbar_value added

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1725 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atlka 2001-08-28 08:06:26 +00:00
parent 855050e68a
commit 52b53568c2
1 changed files with 5 additions and 1 deletions

View File

@ -1762,7 +1762,11 @@ if(rel_seek_secs || abs_seek_pos){
if(len>0){ if(len>0){
osd_visible=sh_video->fps; // 1 sec osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=0; 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 #endif