summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-08 10:04:08 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-08 10:04:08 +0000
commitbfc18929a735e3be6888481f113de53630b6509e (patch)
treea902fecab1216f2009a7da7f740fc6297be0e285 /stream
parent641a7ddabd7bc93e05d603dbbbc9bb506d4c72f2 (diff)
downloadmpv-bfc18929a735e3be6888481f113de53630b6509e.tar.bz2
mpv-bfc18929a735e3be6888481f113de53630b6509e.tar.xz
More accurate calculating of teletext
page update intervals git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24365 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/tvi_vbi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/tvi_vbi.c b/stream/tvi_vbi.c
index cf1bfcc0bf..2651c93c8b 100644
--- a/stream/tvi_vbi.c
+++ b/stream/tvi_vbi.c
@@ -153,6 +153,7 @@ typedef struct {
int cache_reset;
/// "page changed" flag: 0-unchanged, 1-entire page, 3-only header
int page_changed;
+ int last_rendered;
} priv_vbi_t;
static unsigned char fixParity[256];
@@ -1836,9 +1837,10 @@ int teletext_control(void* p, int cmd, void *arg)
return TVI_CONTROL_TRUE;
case TV_VBI_CONTROL_MARK_UNCHANGED:
priv->page_changed=0;
+ priv->last_rendered=GetTimerMS();
return TVI_CONTROL_TRUE;
case TV_VBI_CONTROL_IS_CHANGED:
- if((GetTimerMS()/250)%2) //forcing page update every 1/4 sec
+ if(GetTimerMS()-priv->last_rendered> 250) //forcing page update every 1/4 sec
priv->page_changed=3; //mark that header update is enough
*(int*)arg=priv->page_changed;
return TVI_CONTROL_TRUE;