diff options
| author | Lars Hanisch <dvb@flensrocker.de> | 2010-08-21 22:42:05 +0200 |
|---|---|---|
| committer | Lars Hanisch <dvb@flensrocker.de> | 2010-08-21 22:42:05 +0200 |
| commit | c984887d32b9f12eae5b3c1538f79fbf7bad26b5 (patch) | |
| tree | ef6aea233ca5a55ecfd24c3fb462a79721019029 | |
| parent | 304c20feba95453752174a5d7a45def058bcd336 (diff) | |
| download | vdr-plugin-pvrinput-c984887d32b9f12eae5b3c1538f79fbf7bad26b5.tar.gz vdr-plugin-pvrinput-c984887d32b9f12eae5b3c1538f79fbf7bad26b5.tar.bz2 | |
increase continuity counter before _every_ teletext packet
| -rwxr-xr-x | pvrinput.c | 2 | ||||
| -rwxr-xr-x | reader.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -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"); @@ -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; } |
