diff options
| author | Thomas Reufer <thomas@reufer.ch> | 2015-02-27 07:18:17 +0100 |
|---|---|---|
| committer | Thomas Reufer <thomas@reufer.ch> | 2015-02-27 07:18:17 +0100 |
| commit | 179685f675f49aa9a84d41728571a89bb19ddf96 (patch) | |
| tree | 62032a4476b3aa85da2839af21a1f72c14fe1c5a | |
| parent | 41ceb775026eaed43e0d44f5737802cb10434e7f (diff) | |
| download | vdr-plugin-rpihddevice-179685f675f49aa9a84d41728571a89bb19ddf96.tar.gz vdr-plugin-rpihddevice-179685f675f49aa9a84d41728571a89bb19ddf96.tar.bz2 | |
fixed OMX clock start on still picture and stream start
| -rw-r--r-- | omxdevice.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/omxdevice.c b/omxdevice.c index ddb23d8..65c305c 100644 --- a/omxdevice.c +++ b/omxdevice.c @@ -235,6 +235,7 @@ void cOmxDevice::StillPicture(const uchar *Data, int Length) m_mutex->Lock(); m_playbackSpeed = eNormal; m_direction = eForward; + m_omx->StopClock(); // to get a picture displayed, PlayVideo() needs to be called // 4x for MPEG2 and 10x for H264... ? @@ -280,9 +281,10 @@ int cOmxDevice::PlayAudio(const uchar *Data, int Length, uchar Id) DBG("audio first"); m_omx->SetClockScale(s_playbackSpeeds[m_direction][m_playbackSpeed]); m_omx->StartClock(m_hasVideo, m_hasAudio); - if (Transferring()) - ResetLatency(); } + + if (Transferring()) + ResetLatency(); } int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : 0; @@ -365,15 +367,16 @@ int cOmxDevice::PlayVideo(const uchar *Data, int Length, bool EndOfFrame) if (videoRestart) { + m_hasVideo = true; + if (!m_hasAudio) { DBG("video first"); m_omx->SetClockReference(cOmx::eClockRefVideo); + m_omx->SetClockScale(s_playbackSpeeds[m_direction][m_playbackSpeed]); + m_omx->StartClock(m_hasVideo, m_hasAudio); } - m_hasVideo = true; - m_omx->SetClockScale(s_playbackSpeeds[m_direction][m_playbackSpeed]); - m_omx->StartClock(m_hasVideo, m_hasAudio); if (Transferring()) ResetLatency(); } |
