[mythtv] assert

John Patrick Poet john at BlueSkyTours.com
Thu Dec 16 06:54:32 UTC 2004


Hi Daniel,

I have another request:  Please take all the asserts out of the code.

Having the frontend die because of an assert, I can live with.  Having 
the backend die because of an assert is evil!  Even if it cannot record 
the program that caused the assert, it should not kill the other 
recordings being made.

For example, my backend died with:

mythbackend: mpeg/mpegstreamdata.cpp:151: bool 
MPEGStreamData::CreatePMT(const ProgramMapTable&): Assertion 
`audioAC3.size()+audioMPEG.size()' failed.

I have changed that line to:

#if 0
    assert(audioAC3.size()+audioMPEG.size()); // must have audio
#else
    if (audioAC3.size()+audioMPEG.size() == 0)
    {
        VERBOSE(VB_RECORD, "CreatePMT: no audio!");
        return false;
    }
#endif

I am not sure what the right thing to do there is, but I never want the 
backend to die.

Thanks,

John

P.S.  I am working a new version of the ringbuffer code.  Not sure if I 
can get it to handle a simultaneous compile job, but I am trying.



More information about the mythtv-dev mailing list