Ticket #7067: t7067_setscan_extra_checks.diff

File t7067_setscan_extra_checks.diff, 2.3 KB (added by skamithi, 10 years ago)

patch that should prevent the excess SetScanType?() processing from Taylor Ralph

  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    183183      video_frame_rate(29.97f), video_aspect(4.0f / 3.0f),
    184184      forced_video_aspect(-1),
    185185      m_scan(kScan_Interlaced),     m_scan_locked(false),
    186       m_scan_tracker(0),
     186      m_scan_tracker(0),            m_scan_initialized(false),
    187187      keyframedist(30),
    188188      // Prebuffering (RingBuffer) control
    189189      prebuffering(false), prebuffer_tries(0), prebuffer_tries_total(0),
     
    244244      decoder_lock(QMutex::Recursive),
    245245      next_play_speed(1.0f),        next_normal_speed(true),
    246246      play_speed(1.0f),             normal_speed(true),
    247       frame_interval((int)(1000000.0f / 30)), ffrew_skip(1),
     247      frame_interval((int)(1000000.0f / 30)), m_frame_interval(0),
     248      ffrew_skip(1),
    248249      // Audio and video synchronization stuff
    249250      videosync(NULL),              delay(0),
    250251      vsynctol(30/4),               avsync_delay(0),
     
    10741075    if (!videoOutput || !videosync)
    10751076        return; // hopefully this will be called again later...
    10761077
     1078    if (m_scan_initialized &&
     1079        m_scan == scan &&
     1080        m_frame_interval == frame_interval)
     1081        return;
     1082
    10771083    m_scan_locked = (scan != kScan_Detect);
    10781084
     1085    m_scan_initialized = true;
     1086    m_frame_interval = frame_interval;
     1087
    10791088    bool interlaced = is_interlaced(scan);
    10801089    if (interlaced && !m_deint_possible)
    10811090    {
  • libs/libmythtv/NuppelVideoPlayer.h

     
    637637    bool     m_scan_locked;
    638638    /// Used for tracking of scan type for auto-detection of interlacing
    639639    int      m_scan_tracker;
     640    /// Set when SetScanType runs the first time
     641    bool     m_scan_initialized;
    640642    /// Video (input) Number of frames between key frames (often inaccurate)
    641643    int keyframedist;
    642644
     
    787789    float      play_speed;   
    788790    bool       normal_speed; 
    789791    int        frame_interval;///< always adjusted for play_speed
     792    int        m_frame_interval;///< used to detect changes to frame_interval
    790793
    791794    int        ffrew_skip;   
    792795