Ticket #1261: mythtv_startup2.patch

File mythtv_startup2.patch, 2.3 KB (added by Mark Spieth, 18 years ago)
  • libs/libmythtv/NuppelVideoPlayer.h

     
    569573    bool       m_playing_slower;
    570574    bool       decode_extra_audio;
    571575    float      m_stored_audio_stretchfactor;
     576    bool       audio_paused;
    572577
    573578    // Audio warping stuff
    574579    bool       usevideotimebase;
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    159160      avsync_oldavg(0),             refreshrate(0),
    160161      lastsync(false),              m_playing_slower(false),
    161162      m_stored_audio_stretchfactor(1.0),
     163      audio_paused(false),
    162164      // Audio warping stuff
    163165      usevideotimebase(false),
    164166      warpfactor(1.0f),             warpfactor_avg(1.0f),
     
    282284    //cout << "stopping other threads" << endl;
    283285    PauseVideo(waitvideo);
    284286    if (audioOutput)
     287    {
     288        audio_paused = true;
    285289        audioOutput->Pause(true);
     290    }
    286291    if (ringBuffer)
    287292        ringBuffer->Pause();
    288293
     
    304309
    305310    UnpauseVideo();
    306311    if (audioOutput && unpauseaudio)
    307         audioOutput->Pause(false);
     312        audio_paused = false;
    308313    if (ringBuffer)
    309314        ringBuffer->Unpause();
    310315
     
    352358    {
    353359        prebuffering = prebuffer;
    354360        if (audioOutput && !paused)
    355             audioOutput->Pause(prebuffering);
     361        {
     362            if (prebuffering)
     363                audioOutput->Pause(prebuffering);
     364            audio_paused = prebuffering;
     365        }
    356366    }
    357367
    358368    if (!prebuffering)
     
    19291960    videoOutput->ProcessFrame(frame, osd, videoFilters, pipplayer);
    19301961    videofiltersLock.unlock();
    19311962
     1963    if (audioOutput && !audio_paused && audioOutput->GetPause())
     1964        audioOutput->Pause(false);
     1965
    19321966    AVSync();
    19331967
    19341968    videoOutput->DoneDisplayingFrame();
     
    23612397    }
    23622398
    23632399    if (audioOutput)
     2400    {
     2401        audio_paused = true;
     2402        audioOutput->Pause(true);   // always start audio off as paused
    23642403        audioOutput->SetStretchFactor(audio_stretchfactor);
     2404    }
    23652405    next_play_speed = audio_stretchfactor;
    23662406
    23672407    if (!InitVideo())