# HG changeset patch # User atlka # Date 998985986 0 # Node ID bbd054c2cc2025e3436fe5d7347d498f33dc8ded # Parent 5e4214a7540ef5b60c2e066219c35a288b03efdd checking range of vo_osd_progbar_value added diff -r 5e4214a7540e -r bbd054c2cc20 mplayer.c --- 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