]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
parser teletext: a little more fix for duplicate subtitles, fixes #3996
authorJaroslav Kysela <perex@perex.cz>
Thu, 4 Oct 2018 15:54:52 +0000 (17:54 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 4 Oct 2018 15:55:11 +0000 (17:55 +0200)
src/parsers/parser_teletext.c

index 5b5168f64477881e603f59515db2d7656de03655..dbf2aa366aec82f460e024bb89318b029a96ff02 100644 (file)
@@ -790,17 +790,16 @@ extract_subtitle(parser_t *t, parser_es_t *st, tt_mag_t *ttm, int64_t pts)
       sub[off++] = '\n';
   }
 
+  /* Avoid multiple blank subtitles */
   if(off == 0 && st->es_blank)
-    return 0; // Avoid multiple blank subtitles
+    return 0;
 
   st->es_blank = !off;
 
   sub[off++] = 0;
 
   /* Check for a duplicate */
-  if ((ttm->ttm_last_sub_pts == pts ||
-       ttm->ttm_last_sub_pts == pts - 1) &&
-      strcmp((char *)ttm->ttm_last_sub_text, (char *)sub) == 0)
+  if (strcmp((char *)ttm->ttm_last_sub_text, (char *)sub) == 0)
     return 0;
 
   ttm->ttm_last_sub_pts = pts;