# HG changeset patch # User voroshil # Date 1189245848 0 # Node ID 388ac5e95da1ab8029e63690d8c2274bc16c85dc # Parent 09d4026723982e52c15d6bf8d59f207dcbb57eb7 More accurate calculating of teletext page update intervals diff -r 09d402672398 -r 388ac5e95da1 stream/tvi_vbi.c --- a/stream/tvi_vbi.c Sat Sep 08 09:48:43 2007 +0000 +++ b/stream/tvi_vbi.c Sat Sep 08 10:04:08 2007 +0000 @@ -153,6 +153,7 @@ 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 @@ 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;