diff options
| author | Thomas Reufer <thomas@reufer.ch> | 2015-03-03 21:40:00 +0100 |
|---|---|---|
| committer | Thomas Reufer <thomas@reufer.ch> | 2015-03-03 21:40:00 +0100 |
| commit | a30995b5241d469f88c4dd16ed4635f45a57876c (patch) | |
| tree | ba0496a644dbd3907e7760f09c45d63fce21257d | |
| parent | cad592391151947aa9a168188cb02fb7b83f2600 (diff) | |
| download | vdr-plugin-rpihddevice-a30995b5241d469f88c4dd16ed4635f45a57876c.tar.gz vdr-plugin-rpihddevice-a30995b5241d469f88c4dd16ed4635f45a57876c.tar.bz2 | |
improved video frame rate detection to be more tolerant to inaccurate values
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | omx.c | 7 |
2 files changed, 6 insertions, 2 deletions
@@ -2,6 +2,7 @@ VDR Plugin 'rpihddevice' Revision History ----------------------------------------- - fixed: + - improved video frame rate detection to be more tolerant to inaccurate values - adapted cOvgRawOsd::Flush() to new cOsd::RenderPixmaps() of vdr-2.1.10 - fixed calculation of string height (reported by Klaus Schmidinger) - additionally set number of in/out channels when setting up audio resampler @@ -239,8 +239,11 @@ void cOmx::HandlePortSettingsChanged(unsigned int portId) m_videoFormat.width = portdef.format.video.nFrameWidth; m_videoFormat.height = portdef.format.video.nFrameHeight; m_videoFormat.interlaced = interlace.eMode != OMX_InterlaceProgressive; - m_videoFormat.frameRate = - ALIGN_UP(portdef.format.video.xFramerate, 1 << 16) >> 16; + + // discard 4 least significant bits, since there might be some deviation + // due to jitter in time stamps + m_videoFormat.frameRate = ALIGN_UP( + portdef.format.video.xFramerate & 0xfffffff0, 1 << 16) >> 16; // workaround for progressive streams detected as interlaced video by // the decoder due to missing SEI parsing |
