Ticket #743: find-correct-pat.diff

File find-correct-pat.diff, 1.6 KB (added by Stuart Auchterlonie, 18 years ago)

Patch to pickup correct PAT.

  • libs/libmythtv/mpeg/mpegstreamdata.cpp

    old new  
    375375                ProgramAssociationTable *pat =
    376376                    new ProgramAssociationTable(psip);
    377377                CachePAT(pat);
    378                 emit UpdatePAT(pat);
    379                 if ((_desired_program >= 0) && CreatePATSingleProgram(*pat))
     378                if (_desired_program < 0)
     379                {
     380                    emit UpdatePAT(pat);
     381                }
     382                if ((_desired_program >= 0) && pat->FindPID(_desired_program))
     383                {
     384                    CreatePATSingleProgram(*pat);
     385                    emit UpdatePAT(pat);
    380386                    emit UpdatePATSingleProgram(PATSingleProgram());
     387                }
    381388            }
    382389            else
    383390            {
    384391                ProgramAssociationTable pat(psip);
    385                 emit UpdatePAT(&pat);
    386                 if ((_desired_program >= 0) && CreatePATSingleProgram(pat))
     392                if (_desired_program < 0)
     393                {
     394                    emit UpdatePAT(&pat);
     395                }
     396                else if ((_desired_program >= 0) && pat.FindPID(_desired_program))
     397                {
     398                    CreatePATSingleProgram(pat);
     399                    emit UpdatePAT(&pat);
    387400                    emit UpdatePATSingleProgram(PATSingleProgram());
     401                }
    388402            }
    389403            return true;
    390404        }