Ticket #10495: 0005-fix-Failed-CRC-check-0xVARIABLE-0xVARIABLE-for-Strea.2.patch

File 0005-fix-Failed-CRC-check-0xVARIABLE-0xVARIABLE-for-Strea.2.patch, 3.1 KB (added by dekarl@…, 12 years ago)

Updated patch, no CRC for Dishnet

  • mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp

    From 6dd137c768b7bd84b6e5524d46d3fd6b5df53f30 Mon Sep 17 00:00:00 2001
    From: Karl Dietz <dekarl@users.sourceforge.net>
    Date: Fri, 23 Mar 2012 10:10:50 +0100
    Subject: [PATCH 5/6] fix Failed CRC check 0xVARIABLE != 0xVARIABLE for StreamID = 0x80-0x8f
    
    PSIPTable::HasCRC defaults everything 0x80-0xfe to true due to Dishnet.
    But the real CA_message_section doesn't have a CRC.
    
    This should fix ECM/EMM spamming the logs with false errors.
    
    Disable crc checking for Dishnet for the time being
    ---
     mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp |    2 +-
     mythtv/libs/libmythtv/mpeg/mpegtables.cpp     |   13 +++++++++++--
     mythtv/libs/libmythtv/mpeg/mpegtables.h       |    1 +
     3 files changed, 13 insertions(+), 3 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp b/mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
    index 43bcbe8..7f1d2a3 100644
    a b void MPEGStreamData::HandleTSTables(const TSPacket* tspacket) 
    931931        DONE_WITH_PSIP_PACKET();
    932932    }
    933933
    934     // Don't do validation on tables withotu CRC
     934    // Don't do validation on tables without CRC
    935935    if (!psip->HasCRC())
    936936    {
    937937        HandleTables(tspacket->PID(), *psip);
  • mythtv/libs/libmythtv/mpeg/mpegtables.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/mpegtables.cpp b/mythtv/libs/libmythtv/mpeg/mpegtables.cpp
    index 39ce59c..92a1e90 100644
    a b uint StreamID::Normalize(uint stream_id, const desc_list_t &desc, 
    7777
    7878bool PSIPTable::HasCRC(void) const
    7979{
     80    // default is false, but gets set to true for 0x80-0xfe at the end!
    8081    bool has_crc = false;
    8182
    8283    switch (TableID())
    bool PSIPTable::HasCRC(void) const 
    169170                has_crc = true;
    170171            }
    171172
    172             // Dishnet Longterm EIT data
     173            // FIXME Dishnet Longterm EIT data, only on PID 0x300! Forces table_id 0x80-0xef to true unless handled before or after!
    173174            if (TableID::DN_EITbego <= TableID() &&
    174175                TableID() <= TableID::DN_EITendo)
    175176            {
    176                 has_crc = true;
     177                // FIXME disable until I know how to filter on PID 0x300 / Dishnet
     178                // has_crc = true;
     179            }
     180
     181            // ATSC/DVB conditional access ECM/EMM, reset to false after Dishnet
     182            if (TableID::ECM0 <= TableID() &&
     183                TableID() <= TableID::ECMend)
     184            {
     185                has_crc = false;
    177186            }
    178187        }
    179188        break;
  • mythtv/libs/libmythtv/mpeg/mpegtables.h

    diff --git a/mythtv/libs/libmythtv/mpeg/mpegtables.h b/mythtv/libs/libmythtv/mpeg/mpegtables.h
    index 053dd1e..a564463 100644
    a b class MTV_PUBLIC TableID 
    305305        SITscte  = 0xFC, // SCTE 35 Splice Info Table (Cueing messages)
    306306
    307307        // ATSC Conditional Access (A/70)
     308        // DVB Conditional Access (TS 100 289)
    308309        ECM0     = 0x80,
    309310        ECM1     = 0x81,
    310311        ECMbeg   = 0x82, // ECM begin private data