summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2014-09-02 15:11:30 +0200
committerThomas Reufer <thomas@reufer.ch>2014-09-02 15:11:30 +0200
commitf5c5c262feec54ffaea1f1525ba274e267637bd3 (patch)
tree1fad95c1486192d7e37ba625abc7dd1abd8e502b
parent405aa1be9ab60dba1a3f3544b2cb5b66fb02f9c7 (diff)
downloadvdr-plugin-rpihddevice-f5c5c262feec54ffaea1f1525ba274e267637bd3.tar.gz
vdr-plugin-rpihddevice-f5c5c262feec54ffaea1f1525ba274e267637bd3.tar.bz2
play multiple video PES packets sequentially in StillPicture()
-rw-r--r--HISTORY1
-rw-r--r--omxdevice.c14
2 files changed, 14 insertions, 1 deletions
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();
}