[libdvbpsi-devel] Fix decoding of the CA identifier descriptor

Daniel Kamil Kozar git at videolan.org
Mon Aug 24 12:54:43 CEST 2015


libdvbpsi | branch: master | Daniel Kamil Kozar <dkk089 at gmail.com> | Sun Jul 19 01:02:12 2015 +0200| [70a72d4ac98d7d722ab4ea5d54a85ca3556a27e0] | committer: Jean-Paul Saman

Fix decoding of the CA identifier descriptor

The decoding function for the CA identifier descriptor does not take into
account the lower byte of i_ca_system_id.

(cherry picked from commit a6bb209280ed156ff509eb98f1d5d33f9c8d719f)
Signed-off-by: Jean-Paul Saman <jpsaman at videolan.org>

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

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

diff --git a/src/descriptors/dr_53.c b/src/descriptors/dr_53.c
index 60094da..daa1ea8 100644
--- a/src/descriptors/dr_53.c
+++ b/src/descriptors/dr_53.c
@@ -70,7 +70,8 @@ dvbpsi_ca_identifier_dr_t * dvbpsi_DecodeCAIdentifierDr(dvbpsi_descriptor_t *p_d
     for (int i = 0; i < i_number; i++)
     {
         /* TODO: decode CA system identifier values */
-        p_decoded->p_system[i].i_ca_system_id = p_descriptor->p_data[2 * i];
+        p_decoded->p_system[i].i_ca_system_id =  p_descriptor->p_data[2 * i] << 8;
+        p_decoded->p_system[i].i_ca_system_id |= p_descriptor->p_data[2 * i + 1];
     }
 
     p_descriptor->p_decoded = (void*)p_decoded;



More information about the libdvbpsi-devel mailing list