From f5c5c262feec54ffaea1f1525ba274e267637bd3 Mon Sep 17 00:00:00 2001 From: Thomas Reufer Date: Tue, 2 Sep 2014 15:11:30 +0200 Subject: play multiple video PES packets sequentially in StillPicture() --- HISTORY | 1 + omxdevice.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index ccd6b1e..805f299 100644 --- a/HISTORY +++ b/HISTORY @@ -10,6 +10,7 @@ VDR Plugin 'rpihddevice' Revision History - reworked setup parameter handling - implemented proper command queue for OVG-OSD - fixed: + - play multiple video PES packets sequentially in StillPicture() - updated parameter when setting clock latency target according omxplayer - code clean up based on cppcheck's results (thanks to Rolf Ahrenberg) diff --git a/omxdevice.c b/omxdevice.c index 6ccb113..c32ea9e 100644 --- a/omxdevice.c +++ b/omxdevice.c @@ -189,7 +189,19 @@ void cOmxDevice::StillPicture(const uchar *Data, int Length) ParseVideoCodec(Data, Length) == cVideoCodec::eMPEG2 ? 4 : 13; while (repeat--) - PlayVideo(Data, Length, !repeat); + { + const uchar *data = Data; + int length = Length; + + // play every single PES packet, rise EOS flag on last + while (length) + { + int pktLen = PesHasLength(data) ? PesLength(data) : length; + PlayVideo(data, pktLen, !repeat && (pktLen == length)); + data += pktLen; + length -= pktLen; + } + } m_mutex->Unlock(); } -- cgit v1.2.3