[PATCH] Add RST decoder/generator support

Roberto Corno <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <CAO6YRm-OQQR=iF46knb2Gj1GCbxdFynamibLhvhVOEjjiDMHjA@mail.gmail.com>
Patch is attached.
Best regards,
Roberto

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
http://mailman.videolan.org/listinfo/libdvbpsi-devel
0001-Add-RST-decoder-generator-support.patch (application/octet-stream, 2.1 KB)
From 8de30ecc8ec048ff6f07cab1b39157fc9c60c465 Mon Sep 17 00:00:00 2001
From: Roberto Corno <[email protected]>
Date: Mon, 23 Jul 2012 14:09:30 +0200
Subject: [PATCH] Add RST decoder/generator support

---
 src/Makefile.am |    3 ++-
 src/dvbpsi.c    |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 0e80e20..5048813 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,7 @@ libdvbpsi_la_LDFLAGS = -version-info 8:0:0 -no-undefined
 pkginclude_HEADERS = dvbpsi.h psi.h descriptor.h demux.h \
                      tables/pat.h tables/pmt.h tables/sdt.h tables/eit.h \
                      tables/cat.h tables/nit.h tables/tot.h tables/sis.h \
-		     tables/bat.h \
+		     tables/bat.h tables/rst.h \
 		     tables/atsc_vct.h tables/atsc_stt.h \
 		     tables/atsc_eit.h tables/atsc_mgt.h \
 		     tables/atsc_ett.h \
@@ -114,6 +114,7 @@ tables_src = tables/pat.c tables/pat_private.h \
              tables/tot.c tables/tot_private.h \
              tables/sis.c tables/sis_private.h \
 	     tables/bat.c tables/bat_private.h \
+	     tables/rst.c tables/rst_private.h \
 	     tables/atsc_vct.c tables/atsc_vct.h \
 	     tables/atsc_stt.c tables/atsc_stt.h \
 	     tables/atsc_eit.c tables/atsc_eit.h \
diff --git a/src/dvbpsi.c b/src/dvbpsi.c
index cb4b383..d017f92 100644
--- a/src/dvbpsi.c
+++ b/src/dvbpsi.c
@@ -470,8 +470,8 @@ bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
                 if (p_section->b_syntax_indicator)
                     p_section->p_payload_end -= 4;
 
-                if ((p_section->p_data[0] == 0x70) /* TDT (has no CRC 32) */ ||
-                    (p_section->p_data[0] != 0x72 && dvbpsi_ValidPSISection(p_section)))
+                if ((p_section->p_data[0] == 0x70) /* TDT (has no CRC 32) */ || (p_section->p_data[0] == 0x71) /* RST (has no CRC 32) */
+                    || (p_section->p_data[0] != 0x72 && dvbpsi_ValidPSISection(p_section)))
                 {
                     /* PSI section is valid */
                     p_section->i_table_id = p_section->p_data[0];
-- 
1.7.5.4
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.