summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2010-08-21 22:42:05 +0200
committerLars Hanisch <dvb@flensrocker.de>2010-08-21 22:42:05 +0200
commitc984887d32b9f12eae5b3c1538f79fbf7bad26b5 (patch)
treeef6aea233ca5a55ecfd24c3fb462a79721019029
parent304c20feba95453752174a5d7a45def058bcd336 (diff)
downloadvdr-plugin-pvrinput-c984887d32b9f12eae5b3c1538f79fbf7bad26b5.tar.gz
vdr-plugin-pvrinput-c984887d32b9f12eae5b3c1538f79fbf7bad26b5.tar.bz2
increase continuity counter before _every_ teletext packet
-rwxr-xr-xpvrinput.c2
-rwxr-xr-xreader.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/pvrinput.c b/pvrinput.c
index 2f2006a..6d50ec7 100755
--- a/pvrinput.c
+++ b/pvrinput.c
@@ -6,7 +6,7 @@
#endif
#endif
-static const char *VERSION = "2010-08-20-ttx-wss";
+static const char *VERSION = "2010-08-21-ttx-wss";
static const char *DESCRIPTION = tr("use Hauppauge PVR as input device");
static const char *MAINMENUENTRY = tr("PVR picture settings");
diff --git a/reader.c b/reader.c
index bb4b019..e52f1e8 100755
--- a/reader.c
+++ b/reader.c
@@ -342,9 +342,10 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length)
uint16_t mod = needed_size % 184;
if (mod > 0)
needed_size += 184 - mod; // fill the last packet with stuffing
+ text_counter = (text_counter + 1) & 15;
memset(ts_buffer, 0xFF, TS_SIZE);
ts_buffer[0] = TS_SYNC_BYTE;
- ts_buffer[1] = (first ? 0x40 : 0x00) | (kTeletextPid >> 8);
+ ts_buffer[1] = 0x40 | (kTeletextPid >> 8);
ts_buffer[2] = kTeletextPid & 0xFF;
ts_buffer[3] = 0x10 | text_counter;
memcpy(ts_buffer + 4, Data, 9 + Data[8]);
@@ -448,12 +449,11 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length)
if ((vbi_line != 0) && (copy_vbi_line || copy_vbi_bytes)) {
if (ts_line_nr == 0) { // send current packet and prepare next one
PutData(ts_buffer, TS_SIZE);
- first = false;
packet_counter--;
text_counter = (text_counter + 1) & 15;
memset(ts_buffer, 0xFF, TS_SIZE);
ts_buffer[0] = TS_SYNC_BYTE;
- ts_buffer[1] = (first ? 0x40 : 0x00) | (kTeletextPid >> 8);
+ ts_buffer[1] = (kTeletextPid >> 8);
ts_buffer[2] = kTeletextPid & 0xFF;
ts_buffer[3] = 0x10 | text_counter;
}