Ticket #264: crc-bug-workaround.patch
File crc-bug-workaround.patch, 3.8 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/mpeg/mpegstreamdata.cpp
19 19 * \param cacheTables If true PAT and PMT tables will be cached 20 20 */ 21 21 MPEGStreamData::MPEGStreamData(int desiredProgram, bool cacheTables) 22 : QObject(NULL, "MPEGStreamData"), 22 : QObject(NULL, "MPEGStreamData"), _have_pmt_CRC_bug(false), 23 23 _pat_version(-1), _cache_tables(cacheTables), _cache_lock(true), 24 24 _cached_pat(NULL), _desired_program(desiredProgram), 25 25 _pat_single_program(NULL), _pmt_single_program(NULL) … … 352 352 return true; 353 353 354 354 // Validate PSIP 355 if (!psip->IsGood()) 355 bool validate = !_have_pmt_CRC_bug || (TableID::PMT != psip->TableID()); 356 if (validate && !psip->IsGood()) 356 357 { 357 358 VERBOSE(VB_RECORD, QString("PSIP packet failed CRC check. " 358 359 "pid(0x%1) type(0x%2)") -
libs/libmythtv/mpeg/mpegstreamdata.h
32 32 virtual void Reset(int desiredProgram); 33 33 34 34 // Table processing 35 void SetIgnoreCRCforPMT(bool pmtCRCbug) { _have_pmt_CRC_bug = pmtCRCbug; } 35 36 virtual bool IsRedundant(const PSIPTable&) const; 36 37 virtual bool HandleTables(uint pid, const PSIPTable &psip); 37 38 virtual bool HandleTSTables(const TSPacket* tspacket); … … 132 133 void CachePMT(uint pid, ProgramMapTable *pmt); 133 134 134 135 protected: 136 bool _have_pmt_CRC_bug; 137 135 138 // Listening 136 139 QMap<uint, bool> _pids_listening; 137 140 QMap<uint, bool> _pids_notlistening; -
libs/libmythtv/videosource.h
68 68 static DISEQC_TYPES GetDISEqCType(uint cardid); 69 69 70 70 static CARD_TYPES GetDVBType(uint device, QString &name, QString &card_type); 71 static bool HasDVBCRCBug(uint device); 71 72 static QString GetDefaultInput(uint cardid); 72 73 73 74 static bool IgnoreEncrypted(uint cardid, const QString &inputname); -
libs/libmythtv/videosource.cpp
110 110 return nRet; 111 111 } 112 112 113 /** \fn CardUtil::HasDVBCRCBug(uint) 114 * \brief Returns true iff the device munges PMT tables, so that they fail a CRC check. 115 * \param [in]device video dev to be checked 116 * \return true iff the device munges PMT tables, so that they fail a CRC check. 117 */ 118 bool CardUtil::HasDVBCRCBug(uint device) 119 { 120 QString name(""), type(""); 121 GetDVBType(device, name, type); 122 return (name == "VLSI VES1x93 DVB-S") || (name == "Philips TDA10046H DVB-T"); 123 } 124 113 125 /** \fn CardUtil::GetCardType(uint, QString&, QString&) 114 126 * \brief Returns the card type from the video device 115 127 * \param [in]nVideoDev video dev to be checked -
libs/libmythtv/tv_rec.cpp
1997 1997 #endif //USING_V4L 1998 1998 if (!sd) 1999 1999 sd = new ATSCStreamData(-1, -1, true); 2000 2000 2001 #ifdef USING_DVB 2002 DVBChannel *dvbc = dynamic_cast<DVBChannel*>(channel); 2003 if (dvbc) 2004 sd->SetIgnoreCRCforPMT(CardUtil::HasDVBCRCBug(dvbc->GetCardNum())); 2005 #endif //USING_DVB 2006 2001 2007 dtvSignalMonitor->SetStreamData(sd); 2002 2008 sd->Reset(progNum); 2003 2009