All pastes #637212 Raw Edit

Mine

public text v1 · immutable
#637212 ·published 2007-07-28 17:54 UTC
rendered paste body
void TVRec::RingBufferChanged(RingBuffer *rb, ProgramInfo *pginfo)
{
    VERBOSE(VB_IMPORTANT, LOC + "RingBufferChanged() cur_rb("
        <<ringBuffer<<") curRecording("<<curRecording<<") lastRec("<<lastRecording<<") ");

    SetRingBuffer(rb);

    if (pginfo)
    {
        // lastRecording = curRecording; // not enough!
        if (curRecording)
        {
            FinishedRecording(curRecording);
            curRecording->MarkAsInUse(false);
            delete curRecording;
        }
        lastRecording = NULL; // This shouldn't be needed!?
        curRecording = new ProgramInfo(*pginfo);
        curRecording->MarkAsInUse(true, "recorder");

        VERBOSE(VB_IMPORTANT, LOC + "RingBufferChanged() new rb("
            <<ringBuffer<<") new curRecording("<<curRecording<<")");
        // The address of curRecording has not changed!
    }
}