From d6f965e34c0e482e5579689ee3150788dad3067f Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 11 Jun 2009 23:56:40 +0200 Subject: [PATCH] servicedvb.cpp: skip subtitles when pts difference is bigger than 20seconds --- lib/service/servicedvb.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 52978dc3..a57a813b 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -2824,17 +2824,21 @@ void eDVBServicePlay::checkSubtitleTiming() m_decoder->getPTS(0, pos); eDebug("%lld %lld", pos, show_time); - int diff = show_time - pos; + int diff = show_time - pos; if (diff < 0) { eDebug("[late (%d ms)]", -diff / 90); diff = 0; } -// if (diff > 900000) -// { -// eDebug("[invalid]"); -// diff = 0; -// } + if (abs(diff) > 1800000) + { + eDebug("skip [invalid]"); + if (type == TELETEXT) + m_subtitle_pages.pop_front(); + else + m_dvb_subtitle_pages.pop_front(); + continue; + } if ((diff/90)<20) { -- 2.30.2