Ticket #7759: t7759_repeat_pict_v2_part2.diff

File t7759_repeat_pict_v2_part2.diff, 894 bytes (added by tralph11@…, 11 years ago)

small update for part 2

  • libs/libmythtv/vsync.cpp

     
    218218        OffsetTimeval(m_nexttrigger, ret_val);
    219219    }
    220220
     221    if (ret_val < -m_frame_interval)
     222    {
     223        ret_val = -m_frame_interval;
     224
     225        // set nexttrigger to our new target time
     226        m_nexttrigger.tv_sec = now.tv_sec;
     227        m_nexttrigger.tv_usec = now.tv_usec;
     228        OffsetTimeval(m_nexttrigger, ret_val);
     229    }
     230
    221231    return ret_val;
    222232}
    223233
     
    681691        // If late, draw the frame ASAP.  If early, hold the CPU until
    682692        // half as late as the previous frame (fudge).
    683693        m_delay = CalcDelay();
     694        m_fudge = min(m_fudge, m_frame_interval);
    684695        while (m_delay + m_fudge > 0)
    685696        {
    686697            m_delay = CalcDelay();