Check CRC in software for DVB as well. (Seems kernel / hw doesnt always do this)
This commit is contained in:
parent
90487e843c
commit
4a810182f5
1 changed files with 8 additions and 2 deletions
10
dvb_tables.c
10
dvb_tables.c
|
@ -78,8 +78,13 @@ dvb_table_recv(int events, void *opaque, int fd)
|
|||
if(r < 3)
|
||||
return;
|
||||
|
||||
r -= 3;
|
||||
/* It seems some hardware (or is it the dvb API?) does not honour the
|
||||
DMX_CHECK_CRC flag, so we check it again */
|
||||
|
||||
if(psi_crc32(sec, r))
|
||||
return;
|
||||
|
||||
r -= 3;
|
||||
tableid = sec[0];
|
||||
len = ((sec[1] & 0x0f) << 8) | sec[2];
|
||||
|
||||
|
@ -87,7 +92,8 @@ dvb_table_recv(int events, void *opaque, int fd)
|
|||
return;
|
||||
|
||||
ptr = &sec[3];
|
||||
len -= 3;
|
||||
len -= 4; /* Strip trailing CRC */
|
||||
|
||||
if(!tdt->tdt_callback(tdt->tdt_tdmi, ptr, len, tableid, tdt->tdt_opaque))
|
||||
tdt->tdt_count++;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue