[bTSstream-devel] sdt: also check consistency of onid
Christophe Massiot
git at videolan.org
Tue Apr 14 14:29:56 CEST 2015
bitstream | branch: master | Christophe Massiot <cmassiot at openheadend.tv> | Tue Apr 14 14:29:44 2015 +0200| [f8a764970b40d8c2c741e36d1aad1d6f9f14c4d1] | committer: Christophe Massiot
sdt: also check consistency of onid
> http://git.videolan.org/gitweb.cgi/bitstream.git/?a=commit;h=f8a764970b40d8c2c741e36d1aad1d6f9f14c4d1
---
dvb/si/sdt.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dvb/si/sdt.h b/dvb/si/sdt.h
index fea3396..d8170e3 100644
--- a/dvb/si/sdt.h
+++ b/dvb/si/sdt.h
@@ -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 */
More information about the biTStream-devel
mailing list