Ticket #4836: libs_libmythtv_avformatdecoder.cpp-fix-forgotten-null-check.patch

File libs_libmythtv_avformatdecoder.cpp-fix-forgotten-null-check.patch, 999 bytes (added by Erik Hovland <erik@…>, 16 years ago)

checks ic and ringBuffer to make sure they are not null

  • libs/libmythtv/avformatdecoder.cpp

    Need to make sure that we check for null before we pass on to other functions.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/avformatdecoder.cpp |    5 ++---
     1 files changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/libs/libmythtv/avformatdecoder.cpp b/libs/libmythtv/avformatdecoder.cpp
    index ceedf75..bc1e243 100644
    a b void AvFormatDecoder::ScanTeletextCaptions(int av_index) 
    13671367 */
    13681368void AvFormatDecoder::ScanDSMCCStreams(void)
    13691369{
    1370     if (!ic->cur_pmt_sect)
     1370    if (!ic || !ic->cur_pmt_sect)
    13711371        return;
    13721372
    13731373    if (!itv && ! (itv = GetNVP()->GetInteractiveTV()))
    int AvFormatDecoder::ScanStreams(bool novideo) 
    17831783    if (bitrate > 0)
    17841784    {
    17851785        bitrate = (bitrate + 999) / 1000;
    1786         if (ringBuffer)
    1787             ringBuffer->UpdateRawBitrate(bitrate);
     1786        ringBuffer->UpdateRawBitrate(bitrate);
    17881787    }
    17891788
    17901789    if (ringBuffer->isDVD())