Set reserved bits to 1 when generating the cable delivery system descriptor

[email protected] (Daniel Kamil Kozar) Wed, 2 Sep 2015 17:31:27 +0200 (CEST)
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <[email protected]>
libdvbpsi | branch: master | Daniel Kamil Kozar <[email protected]> | Thu Aug 27 21:46:02 2015 +0200| [8999bc4d6d7b1ef91a2a45885592649f60a95432] | committer: Jean-Paul Saman

Set reserved bits to 1 when generating the cable delivery system descriptor

According to EN 300 468, 12 bits after the frequency field are reserved
for future use. Thus, they should be set to 1.

(cherry picked from commit 6e007df2f7eef82243974e3b619fe1c366a1b6a1)
Signed-off-by: Jean-Paul Saman <[email protected]>

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=8999bc4d6d7b1ef91a2a45885592649f60a95432
---

 src/descriptors/dr_44.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/descriptors/dr_44.c b/src/descriptors/dr_44.c
index 2fc8119..69e5dd4 100644
--- a/src/descriptors/dr_44.c
+++ b/src/descriptors/dr_44.c
@@ -99,7 +99,9 @@ dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
     p_descriptor->p_data[1]  =     (p_decoded->i_frequency >> 16)       & 0xff;
     p_descriptor->p_data[2]  =     (p_decoded->i_frequency >>  8)       & 0xff;
     p_descriptor->p_data[3]  =      p_decoded->i_frequency              & 0xff;
-    p_descriptor->p_data[5]  =     (p_decoded->i_fec_outer              & 0x0f);
+    p_descriptor->p_data[4]  =      0xff;
+    p_descriptor->p_data[5]  =      0xf0
+                                  |(p_decoded->i_fec_outer              & 0x0f);
     p_descriptor->p_data[6]  =     (p_decoded->i_modulation);
     p_descriptor->p_data[7]  =     (p_decoded->i_symbol_rate >> 20)     & 0xff;
     p_descriptor->p_data[8]  =     (p_decoded->i_symbol_rate >> 12)     & 0xff;

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvbpsi-devel