[mythtv-users] Program #1 not found in PAT!

klaas de waal klaas.de.waal at gmail.com
Thu Apr 2 06:55:31 UTC 2009


On Wed, Apr 1, 2009 at 4:19 PM,  <greg at nodecam.com> wrote:
> I switched over to an iptv setup recently, and have run into a couple of
> small problems that I'm hoping someone can help me out with.
>
> I'm running on Gentoo, with a relatively older build (mythtv-0.21_p18314-r1)
>
> Occasionally the system doesn't record anything, even though it thinks it
> did.  I believe no file is created, but I deleted the offending
> "recordings" via the mythfrontend as soon as I found them in hopes that
> they would re-record.  Mythfrontend reported "The file for this recording
> cannot be found" for each of them.  Once this happens, it seems to hit
> about 50% of recordings until I restart the backend.
>
> the backend log for the start of the recording looks like this:
>
> 2009-03-30 17:58:29.767 TVRec(1): ASK_RECORDING 1 29 0 0
> 2009-03-30 17:59:01.682 TVRec(1): Changing from None to RecordingOnly
> 2009-03-30 17:59:01.703 TVRec(1): HW Tuner: 1->1
> 2009-03-30 17:59:01.827 Program #1 not found in PAT!
> 2009-03-30 17:59:01.864 But there is only one program in the PAT, so we'll
> just use it
> 2009-03-30 17:59:01.877 AutoExpire: CalcParams(): Max required Free Space:
> 3.0 GB w/freq: 8 min
> 2009-03-30 17:59:01.881 Started recording: Chuck "Chuck Versus the Broken
> Heart": channel 1309 on cardid 1, sourceid 1
>
> Any thoughts?
>
> Greg
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

First suggestion: get the latest MythTV.

Second suggestion: remove the following code:
    if (programNumber >= 0)
    {
        // BEGIN HACK HACK HACK
        // Reset version in case we're physically on the wrong transport
        // due to tuning hardware being in a transitional state or we
        // are in the middle of something like a DiSEqC rotor turn.
        uint tsid = pat->TransportStreamID();
        GetStreamData()->SetVersionPAT(tsid, -1,0);
        // END HACK HACK HACK

        if (last_pat_crc != pat->CRC())
        {
            last_pat_crc = pat->CRC();
            QString errStr = QString("Program #%1 not found in PAT!")
                .arg(programNumber);
            VERBOSE(VB_IMPORTANT, errStr<<endl<<pat->toString());
        }
        if (pat->ProgramCount() == 1)
        {
            VERBOSE(VB_IMPORTANT, "But there is only one program "
                    "in the PAT, so we'll just use it");
            SetProgramNumber(pat->ProgramNumber(0));
            AddFlags(kDTVSigMon_PATMatch);
            GetStreamData()->AddListeningPID(pat->ProgramPID(0));
            last_pat_crc = pat->CRC();
        }
    }


This is in mythtv/libs/libmythtv/dtvsignalmonitor.cpp, function HandlePAT

I think the HandlePAT can be called with a wrong pat. If the wrong pat
is just ignored
then the HandlePAT will be called again within a second or so with the
correct pat.
Nothing guaranteed of course, but you could try it.
If it works for you also I can make a trac ticket to remove this piece of code.


More information about the mythtv-users mailing list