diff options
Diffstat (limited to 'dxr3interface.c')
-rw-r--r-- | dxr3interface.c | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/dxr3interface.c b/dxr3interface.c index b8edfd0..981aab0 100644 --- a/dxr3interface.c +++ b/dxr3interface.c @@ -257,7 +257,7 @@ void cDxr3Interface::Pause() } // ================================== -void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame, int times) +void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame) { if (!m_VideoActive) { return; @@ -266,35 +266,22 @@ void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame, int times) int written = 0; int count = 0; - Lock(); - - for (int i = 0; i < times; i++) - { - if (times > 1) - { - dsyslog("dxr3: playvideoframe: times=%d", times); - } - - while (written < pFrame->GetCount() && count >= 0) - { - if ((count = write(m_fdVideo, pFrame->GetData() + written, pFrame->GetCount() - written)) == -1) - { - // an error occured - Resuscitation(); - } - written += count; - } + Lock(); - // reset - written = 0; - } + while (written < pFrame->GetCount() && count >= 0) { + if ((count = write(m_fdVideo, pFrame->GetData() + written, pFrame->GetCount() - written)) == -1) { + // an error occured + Resuscitation(); + } + written += count; + } - Unlock(); + Unlock(); - SetAspectRatio(pFrame->GetAspectRatio()); - uint32_t pts = pFrame->GetPts(); - if (pts > 0) - m_lastSeenPts = pts; + SetAspectRatio(pFrame->GetAspectRatio()); + uint32_t pts = pFrame->GetPts(); + if (pts > 0) + m_lastSeenPts = pts; } // ================================== |