Mercurial > mplayer.hg
changeset 1724:bbd054c2cc20
checking range of vo_osd_progbar_value added
author | atlka |
---|---|
date | Tue, 28 Aug 2001 08:06:26 +0000 |
parents | 5e4214a7540e |
children | 24e75b632740 |
files | mplayer.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Mon Aug 27 23:56:44 2001 +0000 +++ b/mplayer.c Tue Aug 28 08:06:26 2001 +0000 @@ -1762,7 +1762,11 @@ 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