]> 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:54:52 +0000 (17:54 +0200)
src/parsers/parser_teletext.c

index 3ea3f60f1f2d4150c6b133c40935f26e4b8c2e04..f1ef5936c6f4526f05ea7b83797db0b5a089438d 100644 (file)
@@ -790,17 +790,16 @@ extract_subtitle(mpegts_service_t *t, elementary_stream_t *st,
       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;