[MPlayer-cvslog] r24325 - trunk/stream/tvi_vbi.c

voroshil subversion at mplayerhq.hu
Sun Sep 2 08:12:32 CEST 2007


Author: voroshil
Date: Sun Sep  2 08:12:32 2007
New Revision: 24325

Log:
Increase number of skipped buffers to 5 to avoid mixing teletext pages from
different channels during channel switch.



Modified:
   trunk/stream/tvi_vbi.c

Modified: trunk/stream/tvi_vbi.c
==============================================================================
--- trunk/stream/tvi_vbi.c	(original)
+++ trunk/stream/tvi_vbi.c	Sun Sep  2 08:12:32 2007
@@ -623,8 +623,12 @@ static inline tt_page* get_from_cache(pr
 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,
     }
     if (priv->cache_reset){
         pthread_mutex_lock(&(priv->buffer_mutex));
-        priv->cache_reset=0;
+        priv->cache_reset--;
         pthread_mutex_unlock(&(priv->buffer_mutex));
     }
 



More information about the MPlayer-cvslog mailing list