Ticket #5080: libs_libmythtv_avformatdecoder.cpp-add-ringbuffer-null-check.patch

File libs_libmythtv_avformatdecoder.cpp-add-ringbuffer-null-check.patch, 772 bytes (added by Erik Hovland <erik@…>, 13 years ago)

checks ringBuffer before dereferencing it

  • libs/libmythtv/avformatdecoder.cpp

    In changeset 16660 there was a change to check for isDVD(). It should
    
    From: Erik Hovland <erik@hovland.org>
    
    be accompanied by a ringbuffer null check.
    ---
    
     libs/libmythtv/avformatdecoder.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmythtv/avformatdecoder.cpp b/libs/libmythtv/avformatdecoder.cpp
    index e444d7f..4460211 100644
    a b int AvFormatDecoder::ScanStreams(bool novideo) 
    18631863    {
    18641864        GetNVP()->SetAudioParams(-1, -1, -1, false /* AC3/DTS pass-through */);
    18651865        GetNVP()->ReinitAudio();
    1866         if (ringBuffer->isDVD())
     1866        if (ringBuffer && ringBuffer->isDVD())
    18671867            audioIn = AudioInfo();
    18681868    }
    18691869