summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--omxdevice.c13
2 files changed, 9 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 488ed01..9c9a2b9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4,6 +4,7 @@ VDR Plugin 'rpihddevice' Revision History
- new:
- add option for dual display usage, see README
- fixed:
+ - ignore pts from erroneous packets to avoid pts jumps on broken streams
- use omxplayer's parameters for deinterlacer
2015-10-18: Version 1.0.0
diff --git a/omxdevice.c b/omxdevice.c
index 2771ec5..616c449 100644
--- a/omxdevice.c
+++ b/omxdevice.c
@@ -334,16 +334,19 @@ int cOmxDevice::PlayVideo(const uchar *Data, int Length, bool EndOfFrame)
m_mutex->Lock();
int ret = Length;
- int64_t pts = PesHasPts(Data) ? PesGetPts(Data) : OMX_INVALID_PTS;
+
+ cVideoCodec::eCodec codec = ParseVideoCodec(Data + PesPayloadOffset(Data),
+ Length - PesPayloadOffset(Data));
+
+ int64_t pts = PesHasPts(Data) && codec != cVideoCodec::eInvalid ?
+ PesGetPts(Data) : OMX_INVALID_PTS;
if (!m_hasVideo && pts != OMX_INVALID_PTS &&
m_videoCodec == cVideoCodec::eInvalid)
{
- m_videoCodec = ParseVideoCodec(Data + PesPayloadOffset(Data),
- Length - PesPayloadOffset(Data));
-
- if (m_videoCodec != cVideoCodec::eInvalid)
+ if (codec != cVideoCodec::eInvalid)
{
+ m_videoCodec = codec;
if (cRpiSetup::IsVideoCodecSupported(m_videoCodec))
{
m_omx->SetVideoCodec(m_videoCodec);