From 74e46362b8dd8e6f5497dabfa11bc24f62073990 Mon Sep 17 00:00:00 2001 From: Thomas Reufer Date: Sun, 28 Sep 2014 15:38:07 +0200 Subject: skip non-video packets in StillPicture(), fixes artifacts in PES recordings --- HISTORY | 1 + omxdevice.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 72daf30..3c15dc4 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: + - skip non-video packets in StillPicture(), fixes artifacts in PES recordings - skip audio substream header for PES recordings with AC3 audio track - reworked audio decoding loop and set correct dstSize before resampling - avoid flushing OMX video chain twice when calling SetPlayMode(pmNone) diff --git a/omxdevice.c b/omxdevice.c index 0a01a9c..7c41fac 100644 --- a/omxdevice.c +++ b/omxdevice.c @@ -207,7 +207,11 @@ void cOmxDevice::StillPicture(const uchar *Data, int Length) while (length) { int pktLen = PesHasLength(data) ? PesLength(data) : length; - PlayVideo(data, pktLen, !repeat && (pktLen == length)); + + // skip non-video packets as they may occur in PES recordings + if ((data[3] & 0xf0) == 0xe0) + PlayVideo(data, pktLen, !repeat && (pktLen == length)); + data += pktLen; length -= pktLen; } -- cgit v1.2.3