1 Index: libs/libmythtv/mpeg/mpegstreamdata.h
2 ===================================================================
3 --- libs/libmythtv/mpeg/mpegstreamdata.h.orig 2006-06-20 17:31:08.000000000 -0400
4 +++ libs/libmythtv/mpeg/mpegstreamdata.h 2006-06-20 17:36:06.000000000 -0400
7 // PAT Timeout handling.
10 bool _invalid_pat_seen;
11 bool _invalid_pat_warning;
12 MythTimer _invalid_pat_timer;
13 Index: libs/libmythtv/mpeg/mpegstreamdata.cpp
14 ===================================================================
15 --- libs/libmythtv/mpeg/mpegstreamdata.cpp.orig 2006-06-20 17:31:08.000000000 -0400
16 +++ libs/libmythtv/mpeg/mpegstreamdata.cpp 2006-06-20 17:36:06.000000000 -0400
20 AddListeningPID(MPEG_PAT_PID);
22 + _found_program = false;
25 void MPEGStreamData::DeletePartialPES(uint pid)
28 bool MPEGStreamData::IsRedundant(const PSIPTable &psip) const
30 + // If we haven't found the PAT or PMT we're looking for
31 + // we should always reread the tables in case we can't
32 + // rely on the table's version number.
33 + if (!_found_program)
36 const int table_id = psip.TableID();
37 const int version = psip.Version();
41 void MPEGStreamData::ProcessPAT(const ProgramAssociationTable *pat)
43 - bool foundProgram = pat->FindPID(_desired_program);
44 + _found_program = pat->FindPID(_desired_program);
46 if (_desired_program < 0)
52 - if (!_invalid_pat_seen && !foundProgram)
53 + if (!_invalid_pat_seen && !_found_program)
55 _invalid_pat_seen = true;
56 _invalid_pat_warning = false;
58 VERBOSE(VB_RECORD, "ProcessPAT: "
59 "PAT is missing program, setting timeout");
61 - else if (_invalid_pat_seen && !foundProgram &&
62 + else if (_invalid_pat_seen && !_found_program &&
63 (_invalid_pat_timer.elapsed() > 400) && !_invalid_pat_warning)
65 _invalid_pat_warning = true; // only emit one warning...
67 if (CreatePATSingleProgram(*pat))
68 emit UpdatePATSingleProgram(PATSingleProgram());
70 - else if (foundProgram)
71 + else if (_found_program)
73 if (_invalid_pat_seen)
74 VERBOSE(VB_RECORD, "ProcessPAT: Good PAT seen after a bad PAT");