From: ghost Date: Thu, 11 Jun 2009 21:56:40 +0000 (+0200) Subject: servicedvb.cpp: skip subtitles when pts difference is bigger than 20seconds X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=d6f965e34c0e482e5579689ee3150788dad3067f servicedvb.cpp: skip subtitles when pts difference is bigger than 20seconds --- diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 52978dc..a57a813 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) {