Skip to content

Commit

Permalink
Update pespacket CC also when out of sync
Browse files Browse the repository at this point in the history
Update the copy of the continuity counter value of the last
received pes packet also when the packet is out of sync; it
is still the last packet received.
  • Loading branch information
kmdewaal committed Dec 20, 2024
1 parent 3a8973a commit 3b14fdf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mythtv/libs/libmythtv/mpeg/pespacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,21 @@ bool PESPacket::AddTSPacket(const TSPacket* packet, int cardid, bool &broken)
}
else if (int(m_ccLast) == cc)
{
// do nothing with repeats
// Do nothing with repeats
if (VERBOSE_LEVEL_CHECK(VB_RECORD, LOG_DEBUG))
{
LOG(VB_RECORD, LOG_ERR,
QString("AddTSPacket[%1]: Repeat packet!! ").arg(cardid) +
QString("PID: 0x%1, continuity counter: %2 ").arg(packet->PID(),0,16).arg(cc) +
QString("(expected %1)").arg(ccExp));
}
return true;
}
else
{
// Even if the packet is out of sync it is still the last packet received
m_ccLast = cc;

LOG(VB_RECORD, LOG_ERR,
QString("AddTSPacket[%1]: Out of sync!!! Need to wait for next payloadStart ").arg(cardid) +
QString("PID: 0x%1, continuity counter: %2 ").arg(packet->PID(),0,16).arg(cc) +
Expand Down

0 comments on commit 3b14fdf

Please sign in to comment.