summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-01-26 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-01-26 18:00:00 +0100
commita3942b4d17a3a7e1af82b1950c39db1f9c7ce250 (patch)
tree8b88f1d2db36ab8609c79dc02758652a3d235db3 /eit.c
parent3e1d34f392792bbcf1bda4884c58ca9cec445d1d (diff)
downloadvdr-patch-lnbsharing-a3942b4d17a3a7e1af82b1950c39db1f9c7ce250.tar.gz
vdr-patch-lnbsharing-a3942b4d17a3a7e1af82b1950c39db1f9c7ce250.tar.bz2
Version 1.1.22vdr-1.1.22
- Added 'Hrvatska radiotelevizija' and 'RTV Slovenija' to ca.conf (thanks to Paul Gohn). - Implemented actual user input for CAM enquiry menus. - Since disk file systems apparently don't honor the O_NONBLOCK flag to read from a file in non-blocking mode the cDvbPlayer now uses a non blocking file reader class to make sure replay remains smooth even under heavy system load. - Increased the maximum possible packet size in remux.c to avoid corrupted streams with broadcasters that send extremely large PES packets (thanks to Teemu Rantanen). - Added TS error checking to remux.c (thanks to Teemu Rantanen). - Modified cRingBufferLinear to avoid excessive memmove() calls in 'Transfer Mode' and during recordings, which dramatically reduces CPU load. Thanks to Teemu Rantanen for pinpointing the problem with the excessive memmove() calls. - Updated 'channels.conf' (thanks to Achim Lange). - Added/improved Swedish language texts (thanks to Jan Ekholm). - Fixed the description of the "Scroll pages" OSD setup parameter ('yes' and 'no' were mixed up). - Fixed handling the LOG_LOCALn parameters in the -l option (thanks to Dimitrios Dimitrakos). - Changed EIT processing to always read a full section. - Fixed handling user defined CFLAGS in libdtv/libvdr/Makefile (thanks to Clemens Kirchgatterer and Robert Schiele). - Fixed skipping unavailable channels in the EPG scanner.
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/eit.c b/eit.c
index e2e0fe7..174ad6d 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.63 2003/01/06 15:05:46 kls Exp $
+ * $Id: eit.c 1.64 2003/01/26 12:21:15 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1240,17 +1240,16 @@ void cSIProcessor::Action()
{
if (pfd[a].revents & POLLIN)
{
- /* read section */
- unsigned char buf[4096+1]; // max. allowed size for any EIT section (+1 for safety ;-)
- if (safe_read(filters[a].handle, buf, 3) == 3)
+ // read section
+ unsigned char buf[4096]; // max. allowed size for any EIT section
+ int r = safe_read(filters[a].handle, buf, sizeof(buf));
+ if (r > 3) // minimum number of bytes necessary to get section length
{
- int seclen = ((buf[1] & 0x0F) << 8) | (buf[2] & 0xFF);
+ int seclen = ((buf[1] & 0x0F) << 8) | (buf[2] & 0xFF) + 3;
int pid = filters[a].pid;
- int n = safe_read(filters[a].handle, buf + 3, seclen);
- if (n == seclen)
+ if (seclen == r)
{
- seclen += 3;
- //dsyslog("Received pid 0x%02x with table ID 0x%02x and length of %04d\n", pid, buf[0], seclen);
+ //dsyslog("Received pid 0x%04X with table ID 0x%02X and length of %4d\n", pid, buf[0], seclen);
switch (pid)
{
case 0x00:
@@ -1335,10 +1334,10 @@ void cSIProcessor::Action()
break;
}
}
- /*XXX this just fills up the log file - shouldn't we rather try to re-sync?
+ /*
else
- dsyslog("read incomplete section - seclen = %d, n = %d", seclen, n);
- XXX*/
+ dsyslog("read incomplete section - seclen = %d, r = %d", seclen, r);
+ */
}
}
}