Skip to content

Commit

Permalink
Discard PAT for wrong multiplex
Browse files Browse the repository at this point in the history
When waiting for the PAT for a specific transport stream multiplex
discard PATs for other multiplexes.
After a new tuning request there can be still a number of packets received
from the previous multiplex and these packets can contain a PAT.
This fixes incorrect "Program not found in PAT" and "Rescan your transports"
messages that can sometimes be seen even immediately after a succesful scan.

Refs #13472
  • Loading branch information
kmdewaal committed Jul 4, 2020
1 parent 94931c0 commit e05a8a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mythtv/libs/libmythtv/recorders/dtvsignalmonitor.cpp
Expand Up @@ -13,7 +13,7 @@ using namespace std;

#undef DBG_SM
#define DBG_SM(FUNC, MSG) LOG(VB_CHANNEL, LOG_INFO, \
QString("DTVSigMon[%1](%2)::%3: %4").arg(m_inputid) \
QString("DTVSigMon[%1](%2): %3 %4").arg(m_inputid) \
.arg(m_channel->GetDevice()).arg(FUNC).arg(MSG))

#define LOC QString("DTVSigMon[%1](%2): ") \
Expand Down Expand Up @@ -311,6 +311,14 @@ void DTVSignalMonitor::HandlePAT(const ProgramAssociationTable *pat)
GetStreamData()->SetVersionPAT(tsid, -1,0);
// END HACK HACK HACK

// Discard PAT if we are still on the wrong transport
if (m_transportID > 0 && tsid != m_transportID)
{
DBG_SM("HandlePAT()", QString("Discard PAT for tsid %1 waiting for tsid %2")
.arg(tsid).arg(m_transportID));
return;
}

if (insert_crc(m_seen_table_crc, *pat))
{
QString errStr = QString("Program #%1 not found in PAT!")
Expand Down

0 comments on commit e05a8a8

Please sign in to comment.