Ticket #8963: mythtv-lcd-crash-on-play.patch

File mythtv-lcd-crash-on-play.patch, 1.2 KB (added by Mark Spieth, 10 years ago)
  • mythtv/libs/libmythtv/mythplayer.cpp

    commit 52ad72bafbdf6aa83f773e6470ce732af9c789d0
    Author: Mark Spieth <mspieth@digivation.com.au>
    Date:   Sun Sep 19 12:30:17 2010 +1000
    
        fix crash in lcd timer if too early
    
    diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
    index c18ada3..42d34e4 100644
    a b int MythPlayer::GetSecondsBehind(void) const 
    41974197void MythPlayer::calcSliderPos(osdInfo &info, bool paddedFields)
    41984198{
    41994199    bool islive = false;
    4200     int chapter = GetCurrentChapter() + 1;
    4201     int title = GetCurrentTitle() + 1;
    4202     info.text.insert("chapteridx", chapter ? QString().number(chapter) : QString());
    4203     info.text.insert("titleidx", title ? QString().number(title) : QString());
     4200    if (GetDecoder())
     4201    {
     4202        int chapter = GetCurrentChapter() + 1;
     4203        int title = GetCurrentTitle() + 1;
     4204        info.text.insert("chapteridx", chapter ? QString().number(chapter) : QString());
     4205        info.text.insert("titleidx", title ? QString().number(title) : QString());
     4206    }
    42044207    info.values.insert("position",   0);
    42054208    info.values.insert("progbefore", 0);
    42064209    info.values.insert("progafter",  0);