]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
parsers: allow bigger time diff for DVBSUB
authorJaroslav Kysela <perex@perex.cz>
Fri, 28 Apr 2017 15:16:40 +0000 (17:16 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 28 Apr 2017 15:16:40 +0000 (17:16 +0200)
src/parsers/parsers.c
src/plumbing/tsfix.c

index 48baff55b32471de2437cc3a62d2d1f73500e0f1..23465b4baadf840cf990bf46f02495818cf49540 100644 (file)
@@ -1828,9 +1828,13 @@ parse_teletext(service_t *t, elementary_stream_t *st, const uint8_t *data,
 static void
 parser_deliver(service_t *t, elementary_stream_t *st, th_pkt_t *pkt)
 {
+  int64_t diff;
+
   assert(pkt->pkt_type == st->es_type);
 
-  if (pts_diff(pkt->pkt_pcr, pkt->pkt_pts) > 2*90000) {
+  diff = st->es_type == SCT_DVBSUB ? 4*90000 : 2*90000;
+
+  if (pts_diff(pkt->pkt_pcr, pkt->pkt_pts) > diff) {
     if (tvhlog_limit(&st->es_pcr_log, 2))
       tvhwarn(LS_PARSER, "%s: PTS and PCR diff is very large (%"PRId64")",
               service_component_nicename(st), pts_diff(pkt->pkt_pcr, pkt->pkt_pts));
index a6b15cb681b7741fb4f49192589259dd7a47a33b..866cbd7fd6624beddce766eebefe3e476cb0d7d9 100644 (file)
@@ -509,7 +509,7 @@ tsfix_input_packet(tsfix_t *tf, streaming_message_t *sm)
       LIST_FOREACH(tfs2, &tf->tf_streams, tfs_link)
         if(tfs2->tfs_audio && tfs2->tfs_last_dts_in != PTS_UNSET) {
           diff = tsfix_ts_diff(tfs2->tfs_last_dts_in, pkt->pkt_dts);
-          if (diff > 3 * 90000) {
+          if (diff > 4 * 90000) {
             tvhwarn(LS_TSFIX, "The timediff for %s is big (%"PRId64"), using audio dts",
                     streaming_component_type2txt(tfs->tfs_type), diff);
             tfs->tfs_parent = tfs2;