summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2014-09-26 10:09:19 +0200
committerThomas Reufer <thomas@reufer.ch>2014-09-26 10:09:19 +0200
commit3ad56849c844760dd8317a13f2a2b8b69f3feabc (patch)
tree8652e96ee130da139255830715d8056d7bbcd546
parent7ae07135d0657494733f32cb65c5868a1e8cc78d (diff)
downloadvdr-plugin-rpihddevice-3ad56849c844760dd8317a13f2a2b8b69f3feabc.tar.gz
vdr-plugin-rpihddevice-3ad56849c844760dd8317a13f2a2b8b69f3feabc.tar.bz2
avoid flushing OMX video chain twice when calling SetPlayMode(pmNone)
-rw-r--r--omxdevice.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/omxdevice.c b/omxdevice.c
index 88d6639..23a6475 100644
--- a/omxdevice.c
+++ b/omxdevice.c
@@ -146,8 +146,18 @@ bool cOmxDevice::SetPlayMode(ePlayMode PlayMode)
switch (PlayMode)
{
case pmNone:
- FlushStreams(true);
- m_omx->StopVideo();
+ m_omx->StopClock();
+ m_omx->SetClockScale(0.0f);
+
+ if (m_hasVideo)
+ m_omx->StopVideo();
+
+ if (m_hasAudio)
+ {
+ m_audio->Reset();
+ m_omx->FlushAudio();
+ }
+ m_omx->SetCurrentReferenceTime(0);
m_omx->SetClockReference(cOmx::eClockRefVideo);
m_videoCodec = cVideoCodec::eInvalid;
m_hasAudio = false;