Ticket #8248: ticket_8248_fix.diff

File ticket_8248_fix.diff, 4.8 KB (added by skamithi, 14 years ago)
  • mythtv/libs/libmythtv/DVDRingBuffer.cpp

    diff --git a/mythtv/libs/libmythtv/DVDRingBuffer.cpp b/mythtv/libs/libmythtv/DVDRingBuffer.cpp
    index 6550fcf..b6f4399 100644
    a b DVDRingBufferPriv::DVDRingBufferPriv() 
    5050      m_lastcellid(0), m_vobid(0),
    5151      m_lastvobid(0), m_cellRepeated(false),
    5252      m_buttonstreamid(0), m_runningCellStart(false),
    53       m_runSeekCellStart(false),
    5453      m_menupktpts(0), m_curAudioTrack(0),
    5554      m_curSubtitleTrack(0),
    5655      m_autoselectsubtitle(true),
    bool DVDRingBufferPriv::IsSameChapter(int tmpcellid, int tmpvobid) 
    12521251    return false;
    12531252}
    12541253
    1255 /** \brief Run SeekCellStart its okay to run seekcellstart
    1256  ** ffmpeg for some reason doesnt' output menu spu if seekcellstart
     1254/** \brief Run SeekCellStart.
     1255 ** ffmpeg for some reason does not output menu spu if seekcellstart
    12571256 ** is started too soon after a video codec/resolution change
    12581257 */
    12591258void DVDRingBufferPriv::RunSeekCellStart(void)
    12601259{
    1261     if (!m_runSeekCellStart)
    1262         return;
    1263 
    12641260    bool ret = true;
    12651261    if (NumMenuButtons() > 0 && !m_buttonExists)
    12661262        ret = false;
    12671263
    12681264    if (ret)
    1269     {
    12701265        ret = SeekCellStart();
    1271         m_runSeekCellStart = false;
    1272     }
    12731266}
    12741267
    12751268/** \brief seek the beginning of a dvd cell
  • mythtv/libs/libmythtv/DVDRingBuffer.h

    diff --git a/mythtv/libs/libmythtv/DVDRingBuffer.h b/mythtv/libs/libmythtv/DVDRingBuffer.h
    index 2022aa5..39d8ef6 100644
    a b class MPUBLIC DVDRingBufferPriv 
    107107    void JumpToTitle(bool change) { m_jumptotitle = change; }
    108108    void SetDVDSpeed(void);
    109109    void SetDVDSpeed(int speed);
    110     void SetRunSeekCellStart(bool change) { m_runSeekCellStart = change; }
    111110
    112111    void SetParent(NuppelVideoPlayer *p) { m_parent = p; }
    113112
    114 
    115113  protected:
    116114    dvdnav_t      *m_dvdnav;
    117115    unsigned char  m_dvdBlockWriteBuf[DVD_BLOCK_SIZE];
    class MPUBLIC DVDRingBufferPriv 
    155153    bool           m_cellRepeated;
    156154    int            m_buttonstreamid;
    157155    bool           m_runningCellStart;
    158     bool           m_runSeekCellStart;
    159156    long long      m_menupktpts;
    160157    int            m_curAudioTrack;
    161158    int8_t         m_curSubtitleTrack;
  • mythtv/libs/libmythtv/NuppelVideoPlayer.cpp

    diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
    index b27a757..f80ab51 100644
    a b void NuppelVideoPlayer::ReinitVideo(void) 
    827827        DisableCaptions(textDisplayMode, false);
    828828        SetCaptionsEnabled(true, false);
    829829    }
    830 
    831     if (player_ctx->buffer->InDVDMenuOrStillFrame())
    832         player_ctx->buffer->DVD()->SetRunSeekCellStart(true);
    833830}
    834831
    835832QString NuppelVideoPlayer::ReinitAudio(void)
  • mythtv/libs/libmythtv/avformatdecoder.cpp

    diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
    index 1183a4a..c332004 100644
    a b bool AvFormatDecoder::GetFrame(DecodeType decodetype) 
    35563558            bool cellChanged = ringBuffer->DVD()->CellChanged();
    35573559            bool inDVDStill = ringBuffer->DVD()->InStillFrame();
    35583560            bool inDVDMenu  = ringBuffer->DVD()->IsInMenu();
     3561            int storedPktCount = storedPackets.count();
    35593562            selectedVideoIndex = 0;
    35603563            if (dvdTitleChanged)
    35613564            {
    3562                 if ((storedPackets.count() > 10 && !decodeStillFrame) ||
     3565                if ((storedPktCount > 10 && !decodeStillFrame) ||
    35633566                    decodeStillFrame)
    35643567                {
    35653568                    storevideoframes = false;
    bool AvFormatDecoder::GetFrame(DecodeType decodetype) 
    35733576            {
    35743577                storevideoframes = false;
    35753578
    3576                 if (storedPackets.count() < 2 && !decodeStillFrame)
     3579                if (storedPktCount < 2 && !decodeStillFrame)
    35773580                    storevideoframes = true;
    35783581
    35793582                VERBOSE(VB_PLAYBACK+VB_EXTRA, QString("DVD Playback Debugging "
    35803583                    "inDVDMenu %1 storedPacketcount %2 dvdstill %3")
    3581                     .arg(inDVDMenu).arg(storedPackets.count()).arg(inDVDStill));
    3582 
    3583                 if (inDVDMenu && storedPackets.count() > 0)
    3584                     ringBuffer->DVD()->SetRunSeekCellStart(false);
    3585                 else if (storedPackets.count() == 0)
     3584                    .arg(inDVDMenu).arg(storedPktCount).arg(inDVDStill));
     3585               
     3586                if (inDVDStill && (storedPktCount == 0) &&
     3587                    (GetNVP()->getVideoOutput()->ValidVideoFrames() == 0))
     3588                {
    35863589                    ringBuffer->DVD()->RunSeekCellStart();
     3590                }
    35873591            }
    35883592            if (GetNVP()->AtNormalSpeed() &&
    35893593                ((cellChanged) || (lastdvdtitle != dvdtitle)))