Ticket #1619: foundProgram.diff
File foundProgram.diff, 2.5 KB (added by , 18 years ago) |
---|
-
mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
57 57 { 58 58 SetVersionPAT(-1,0); 59 59 AddListeningPID(MPEG_PAT_PID); 60 61 _found_program = false; 60 62 } 61 63 62 64 MPEGStreamData::~MPEGStreamData() … … 386 388 */ 387 389 bool MPEGStreamData::IsRedundant(uint pid, const PSIPTable &psip) const 388 390 { 391 // If we haven't found the PAT or PMT we're looking for 392 // we should always reread the tables in case we can't 393 // rely on the table's version number. 394 if (!_found_program) 395 return false; 396 389 397 (void) pid; 390 398 const int table_id = psip.TableID(); 391 399 const int version = psip.Version(); … … 462 470 463 471 void MPEGStreamData::ProcessPAT(const ProgramAssociationTable *pat) 464 472 { 465 bool foundProgram = pat->FindPID(_desired_program);473 _found_program = pat->FindPID(_desired_program); 466 474 467 475 if (_desired_program < 0) 468 476 { … … 470 478 return; 471 479 } 472 480 473 if (!_invalid_pat_seen && ! foundProgram)481 if (!_invalid_pat_seen && !_found_program) 474 482 { 475 483 _invalid_pat_seen = true; 476 484 _invalid_pat_warning = false; … … 478 486 VERBOSE(VB_RECORD, "ProcessPAT: " 479 487 "PAT is missing program, setting timeout"); 480 488 } 481 else if (_invalid_pat_seen && ! foundProgram &&489 else if (_invalid_pat_seen && !_found_program && 482 490 (_invalid_pat_timer.elapsed() > 400) && !_invalid_pat_warning) 483 491 { 484 492 _invalid_pat_warning = true; // only emit one warning... … … 491 499 if (CreatePATSingleProgram(*pat)) 492 500 emit UpdatePATSingleProgram(PATSingleProgram()); 493 501 } 494 else if ( foundProgram)502 else if (_found_program) 495 503 { 496 504 if (_invalid_pat_seen) 497 505 VERBOSE(VB_RECORD, "ProcessPAT: Good PAT seen after a bad PAT"); -
mythtv/libs/libmythtv/mpeg/mpegstreamdata.h
227 227 228 228 // PAT Timeout handling. 229 229 private: 230 bool _found_program; 230 231 bool _invalid_pat_seen; 231 232 bool _invalid_pat_warning; 232 233 MythTimer _invalid_pat_timer;