diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-09-02 06:12:32 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-09-02 06:12:32 +0000 |
commit | dfdd17811792f9abee864609aafe94393b618938 (patch) | |
tree | 98375bc9db7412265c9320bf3881707db8e437aa /stream/tvi_vbi.c | |
parent | 0f4b9929ebe86711dece7ae7e5c1cb23c4449d70 (diff) | |
download | mpv-dfdd17811792f9abee864609aafe94393b618938.tar.bz2 mpv-dfdd17811792f9abee864609aafe94393b618938.tar.xz |
Increase number of skipped buffers to 5 to avoid mixing teletext pages from
different channels during channel switch.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24325 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tvi_vbi.c')
-rw-r--r-- | stream/tvi_vbi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/stream/tvi_vbi.c b/stream/tvi_vbi.c index aa493a7eb7..ebe6a11113 100644 --- a/stream/tvi_vbi.c +++ b/stream/tvi_vbi.c @@ -623,8 +623,12 @@ static inline tt_page* get_from_cache(priv_vbi_t* priv, int pagenum,int subpagen static void clear_cache(priv_vbi_t* priv){ int i; tt_page* tp; - priv->cache_reset=1; + /* + Skip next 5 buffers to avoid mixing teletext pages from different + channels during channel switch + */ + priv->cache_reset=5; for(i=0;i<VBI_MAX_PAGES;i++){ while(priv->ptt_cache[i]){ tp=priv->ptt_cache[i]; @@ -1492,7 +1496,7 @@ static void vbi_decode(priv_vbi_t* priv,unsigned char*buf){ } if (priv->cache_reset){ pthread_mutex_lock(&(priv->buffer_mutex)); - priv->cache_reset=0; + priv->cache_reset--; pthread_mutex_unlock(&(priv->buffer_mutex)); } |