From 9c1dc3d6ac0c0ba66b44ad0311e7b7e8b8361ac3 Mon Sep 17 00:00:00 2001 From: REELcoder Date: Fri, 16 Dec 2016 08:45:35 +0100 Subject: [PATCH] Temporary fix for OctopusNet --- device.c | 7 ++++--- tuner.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/device.c b/device.c index 6c8ea80..3d049b0 100644 --- a/device.c +++ b/device.c @@ -417,6 +417,7 @@ bool cSatipDevice::OpenDvr(void) if (pTunerM) pTunerM->Open(); isOpenDvrM = true; + fixedPidsM.Clear(); return true; } @@ -558,11 +559,11 @@ bool cSatipDevice::GetTSPacket(uchar *&dataP) else dataP = GetData(); - if (dataP && (dataP[4] == 0x00) && (dataP[5] == 0x02) && ((dataP[6] & 0xf0) == 0xb0)) { + if (dataP && (dataP[4] == 0x00) && (dataP[5] == 0x02) && ((dataP[6] & 0xfc) == 0xb0)) { int pidA = ((dataP[1] & 0x1f) << 8) | dataP[2]; int pidB = GetPmtPid(); - debug12("%s PID %d/%d 0x%02x%02x%02x%02x%02x%02x%02x", __PRETTY_FUNCTION__, - pidA, pidB, dataP[0], dataP[1], dataP[2], dataP[3], dataP[4], dataP[5], dataP[6]); + debug12("%s PID %d/%d 0x%02x%02x%02x%02x%02x%02x%02x %d", __PRETTY_FUNCTION__, + pidA, pidB, dataP[0], dataP[1], dataP[2], dataP[3], dataP[4], dataP[5], dataP[6], fixedPidsM.IndexOf(pidA)); } return true; diff --git a/tuner.c b/tuner.c index bef87d4..f6516df 100644 --- a/tuner.c +++ b/tuner.c @@ -434,7 +434,7 @@ bool cSatipTuner::UpdatePids(bool forceP) cString uri = cString::sprintf("%sstream=%d", *GetBaseUrl(*streamAddrM, streamPortM), streamIdM); bool useci = (SatipConfig.GetCIExtension() && currentServerM.HasCI()); bool usedummy = currentServerM.IsQuirk(cSatipServer::eSatipQuirkPlayPids); - if (forceP || usedummy) { + if (forceP || usedummy || true) { //temporary fix for OctopusNet addpid bug if (pidsM.Size()) uri = cString::sprintf("%s?pids=%s", *uri, *pidsM.ListPids()); if (usedummy && (pidsM.Size() == 1) && (pidsM[0] < 0x20))