[PATCH] Fix SDT table_id check.

"Steinar H. Gunderson" <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
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

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvbpsi-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.