1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Fixed pid leaking while disabling section filters, EIT filter defition and RTP sequence overflow detection.

This commit is contained in:
Rolf Ahrenberg 2014-03-25 21:29:57 +02:00
parent 9f2d99435d
commit 40d280af10
7 changed files with 23 additions and 30 deletions

View File

@ -23,3 +23,4 @@ VDR Plugin 'satip' Revision History
2014-xx-xx: Version 0.2.0 2014-xx-xx: Version 0.2.0
- Added support for cDevice::Ready(). - Added support for cDevice::Ready().
- Fixed pid leaking while disabling section filters.

View File

@ -70,12 +70,10 @@ cString ChangeCase(const cString &strP, bool upperP)
const section_filter_table_type section_filter_table[SECTION_FILTER_TABLE_SIZE] = const section_filter_table_type section_filter_table[SECTION_FILTER_TABLE_SIZE] =
{ {
/* description tag pid tid mask */ /* description tag pid tid mask */
{trNOOP("PAT (0x00)"), "PAT", 0x00, 0x00, 0xFF}, {trNOOP("PAT (0x00)"), "PAT", 0x00, 0x00, 0xFF},
{trNOOP("NIT (0x40)"), "NIT", 0x10, 0x40, 0xFF}, {trNOOP("NIT (0x40)"), "NIT", 0x10, 0x40, 0xFF},
{trNOOP("SDT (0x42)"), "SDT", 0x11, 0x42, 0xFF}, {trNOOP("SDT (0x42)"), "SDT", 0x11, 0x42, 0xFF},
{trNOOP("EIT (0x4E/0x4F)"), "EIT", 0x12, 0x4E, 0xFE}, {trNOOP("EIT (0x4E/0x4F/0x5X/0x6X)"), "EIT", 0x12, 0x40, 0xC0},
{trNOOP("EIT (0x5X)"), "EIT", 0x12, 0x50, 0xF0}, {trNOOP("TDT (0x70)"), "TDT", 0x14, 0x70, 0xFF},
{trNOOP("EIT (0x6X)"), "EIT", 0x12, 0x60, 0xF0},
{trNOOP("TDT (0x70)"), "TDT", 0x14, 0x70, 0xFF},
}; };

View File

@ -36,7 +36,7 @@
#define SATIP_STATS_ACTIVE_PIDS_COUNT 10 #define SATIP_STATS_ACTIVE_PIDS_COUNT 10
#define SATIP_STATS_ACTIVE_FILTERS_COUNT 10 #define SATIP_STATS_ACTIVE_FILTERS_COUNT 10
#define SECTION_FILTER_TABLE_SIZE 7 #define SECTION_FILTER_TABLE_SIZE 5
#define SATIP_CURL_EASY_GETINFO(X, Y, Z) \ #define SATIP_CURL_EASY_GETINFO(X, Y, Z) \
if ((res = curl_easy_getinfo((X), (Y), (Z))) != CURLE_OK) { \ if ((res = curl_easy_getinfo((X), (Y), (Z))) != CURLE_OK) { \

View File

@ -306,11 +306,12 @@ bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP)
int cSatipDevice::OpenFilter(u_short pidP, u_char tidP, u_char maskP) int cSatipDevice::OpenFilter(u_short pidP, u_char tidP, u_char maskP)
{ {
//debug("cSatipDevice::%s(%u): pid=%d tid=%d mask=%d", __FUNCTION__, deviceIndexM, pidP, tidP, maskP); //debug("cSatipDevice::%s(%u): pid=%d tid=%d mask=%d", __FUNCTION__, deviceIndexM, pidP, tidP, maskP);
if (pSectionFilterHandlerM) { if (pSectionFilterHandlerM) {
if (pTunerM) int handle = pSectionFilterHandlerM->Open(pidP, tidP, maskP);
if (pTunerM && (handle >= 0))
pTunerM->SetPid(pidP, ptOther, true); pTunerM->SetPid(pidP, ptOther, true);
return pSectionFilterHandlerM->Open(pidP, tidP, maskP); return handle;
} }
return -1; return -1;
} }

View File

@ -25,14 +25,8 @@ msgstr "NIT (0x40)"
msgid "SDT (0x42)" msgid "SDT (0x42)"
msgstr "SDT (0x42)" msgstr "SDT (0x42)"
msgid "EIT (0x4E/0x4F)" msgid "EIT (0x4E/0x4F/0x5X/0x6X)"
msgstr "EIT (0x4E/0x4F)" msgstr "EIT (0x4E/0x4F/0x5X/0x6X)"
msgid "EIT (0x5X)"
msgstr "EIT (0x5X)"
msgid "EIT (0x6X)"
msgstr "EIT (0x6X)"
msgid "TDT (0x70)" msgid "TDT (0x70)"
msgstr "TDT (0x70)" msgstr "TDT (0x70)"

View File

@ -25,14 +25,8 @@ msgstr "NIT (0x40)"
msgid "SDT (0x42)" msgid "SDT (0x42)"
msgstr "SDT (0x42)" msgstr "SDT (0x42)"
msgid "EIT (0x4E/0x4F)" msgid "EIT (0x4E/0x4F/0x5X/0x6X)"
msgstr "EIT (0x4E/0x4F)" msgstr "EIT (0x4E/0x4F/0x5X/0x6X)"
msgid "EIT (0x5X)"
msgstr "EIT (0x5X)"
msgid "EIT (0x6X)"
msgstr "EIT (0x6X)"
msgid "TDT (0x70)" msgid "TDT (0x70)"
msgstr "TDT (0x70)" msgstr "TDT (0x70)"

View File

@ -154,9 +154,14 @@ int cSatipSocket::ReadVideo(unsigned char *bufferAddrP, unsigned int bufferLenP)
//unsigned int pt = bufferAddrP[1] & 0x7F; //unsigned int pt = bufferAddrP[1] & 0x7F;
// Sequence number // Sequence number
int seq = ((bufferAddrP[2] & 0xFF) << 8) | (bufferAddrP[3] & 0xFF); int seq = ((bufferAddrP[2] & 0xFF) << 8) | (bufferAddrP[3] & 0xFF);
if ((sequenceNumberM >= 0) && (((sequenceNumberM + 1) % 0xFFFF) != seq)) if ((((sequenceNumberM + 1) % 0xFFFF) == 0) && (seq == 0xFFFF))
sequenceNumberM = -1;
else if ((sequenceNumberM >= 0) && (((sequenceNumberM + 1) % 0xFFFF) != seq)) {
error("missed %d RTP packets", seq - sequenceNumberM - 1); error("missed %d RTP packets", seq - sequenceNumberM - 1);
sequenceNumberM = seq; sequenceNumberM = seq;
}
else
sequenceNumberM = seq;
// Header lenght // Header lenght
unsigned int headerlen = (3 + cc) * (unsigned int)sizeof(uint32_t); unsigned int headerlen = (3 + cc) * (unsigned int)sizeof(uint32_t);
// Check if extension // Check if extension