Browse Source

sdt: also check consistency of onid

master
Christophe Massiot 10 years ago
parent
commit
f8a764970b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      dvb/si/sdt.h

+ 6
- 0
dvb/si/sdt.h View File

@ -228,6 +228,7 @@ static inline bool sdt_table_validate(uint8_t **pp_sections)
{
uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
uint8_t i;
uint16_t i_onid;
for (i = 0; i <= i_last_section; i++) {
uint8_t *p_section = psi_table_get_section(pp_sections, i);
@ -237,6 +238,11 @@ static inline bool sdt_table_validate(uint8_t **pp_sections)
if (!psi_check_crc(p_section))
return false;
if (!j)
i_onid = sdt_get_onid(p_section);
else if (sdt_get_onid(p_section) != i_onid)
return false;
while ((p_service = sdt_get_service(p_section, j)) != NULL) {
j++;
/* check that the service is not already in the table */

Loading…
Cancel
Save