Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

VideoSync: Update the refresh interval after a video stream change.

An input change, as seen in live tv, may change the refresh rate which
then requires an update to the rate stored in the VideoSync object. If
not, under certain circumstances the deinterlacer selection will fail
(and probably a range of other, more subtle issues).

Ref #10173
Ref #8336
  • Loading branch information...
commit d4bbe75e42d0d85f8384c8126fea560af50721c7 1 parent 931369b
Mark Kendall authored
View
14 mythtv/libs/libmythtv/mythplayer.cpp
@@ -619,6 +619,20 @@ void MythPlayer::ReinitVideo(void)
return;
}
+ // the display refresh rate may have been changed by VideoOutput
+ if (videosync)
+ {
+ int ri = MythDisplay::GetDisplayInfo(frame_interval).Rate();
+ if (ri != videosync->getRefreshInterval())
+ {
+ LOG(VB_PLAYBACK, LOG_INFO, LOC +
+ QString("Refresh rate has changed from %1 to %2")
+ .arg(videosync->getRefreshInterval())
+ .arg(ri));
+ videosync->setRefreshInterval(ri);
+ }
+ }
+
if (osd)
osd->SetPainter(videoOutput->GetOSDPainter());
ReinitOSD();
View
2  mythtv/libs/libmythtv/vsync.h
@@ -76,6 +76,8 @@ class VideoSync
/// \brief Returns the (minimum) refresh interval of the output device.
int getRefreshInterval(void) const { return m_refresh_interval; }
+ /// \brief Sets the refresh interval of the output device.
+ void setRefreshInterval(int ri) { m_refresh_interval = ri; }
virtual void setFrameInterval(int fi) { m_frame_interval = fi; };
Please sign in to comment.
Something went wrong with that request. Please try again.