[libdvbpsi-devel] [PATCH] Fix SDT table_id check.

Steinar H. Gunderson sgunderson at bigfoot.com
Mon Sep 30 01:45:30 CEST 2013


The documentation states that both 0x42 (this transponder) and 0x46
(other transponder) tables are accepted, but the check is hard-coded
against 0x42. Make it accept both, in the style of the other decoders.
---
 src/tables/sdt.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tables/sdt.c b/src/tables/sdt.c
index 49b3c5a..c5671ce 100644
--- a/src/tables/sdt.c
+++ b/src/tables/sdt.c
@@ -353,7 +353,11 @@ void dvbpsi_sdt_sections_gather(dvbpsi_t *p_dvbpsi,
     assert(p_dvbpsi);
     assert(p_dvbpsi->p_decoder);
 
-    if (!dvbpsi_CheckPSISection(p_dvbpsi, p_section, 0x42, "SDT decoder"))
+    const uint8_t i_table_id = (p_section->i_table_id == 0x42 ||
+                                p_section->i_table_id == 0x46) ?
+                                    p_section->i_table_id : 0x42;
+
+    if (!dvbpsi_CheckPSISection(p_dvbpsi, p_section, i_table_id, "SDT decoder"))
     {
         dvbpsi_DeletePSISections(p_section);
         return;
-- 
1.7.10.4



More information about the libdvbpsi-devel mailing list