]> git.pld-linux.org Git - packages/mythtv.git/blame - myth_patpmt_r10247.diff
- obsolete
[packages/mythtv.git] / myth_patpmt_r10247.diff
CommitLineData
b91fb912 1Index: 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
5@@ -183,6 +183,7 @@
6
7 // PAT Timeout handling.
8 private:
9+ bool _found_program;
10 bool _invalid_pat_seen;
11 bool _invalid_pat_warning;
12 MythTimer _invalid_pat_timer;
13Index: 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
17@@ -78,6 +78,8 @@
18 }
19
20 AddListeningPID(MPEG_PAT_PID);
21+
22+ _found_program = false;
23 }
24
25 void MPEGStreamData::DeletePartialPES(uint pid)
26@@ -356,6 +358,12 @@
27 */
28 bool MPEGStreamData::IsRedundant(const PSIPTable &psip) const
29 {
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)
34+ return false;
35+
36 const int table_id = psip.TableID();
37 const int version = psip.Version();
38
39@@ -415,7 +423,7 @@
40
41 void MPEGStreamData::ProcessPAT(const ProgramAssociationTable *pat)
42 {
43- bool foundProgram = pat->FindPID(_desired_program);
44+ _found_program = pat->FindPID(_desired_program);
45
46 if (_desired_program < 0)
47 {
48@@ -423,7 +431,7 @@
49 return;
50 }
51
52- if (!_invalid_pat_seen && !foundProgram)
53+ if (!_invalid_pat_seen && !_found_program)
54 {
55 _invalid_pat_seen = true;
56 _invalid_pat_warning = false;
57@@ -431,7 +439,7 @@
58 VERBOSE(VB_RECORD, "ProcessPAT: "
59 "PAT is missing program, setting timeout");
60 }
61- else if (_invalid_pat_seen && !foundProgram &&
62+ else if (_invalid_pat_seen && !_found_program &&
63 (_invalid_pat_timer.elapsed() > 400) && !_invalid_pat_warning)
64 {
65 _invalid_pat_warning = true; // only emit one warning...
66@@ -444,7 +452,7 @@
67 if (CreatePATSingleProgram(*pat))
68 emit UpdatePATSingleProgram(PATSingleProgram());
69 }
70- else if (foundProgram)
71+ else if (_found_program)
72 {
73 if (_invalid_pat_seen)
74 VERBOSE(VB_RECORD, "ProcessPAT: Good PAT seen after a bad PAT");
This page took 0.065943 seconds and 4 git commands to generate.