Commit 9e9cc85f authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

Fix decode and generation of linkage descriptor with mobile handover

Linkage descriptor's generation and decoding routines improperly calculated the
beginning of the private data region in cases where linkage_type = 8,
handover_info = 0, and origin_type = 1.

(cherry picked from commit 979733f1b500a24d43165ed442d9167991a42452)
Signed-off-by: Jean-Paul Saman's avatarJean-Paul Saman <jpsaman@videolan.org>
parent a7f626a2
...@@ -98,6 +98,7 @@ dvbpsi_linkage_dr_t* dvbpsi_DecodeLinkageDr(dvbpsi_descriptor_t * p_descriptor) ...@@ -98,6 +98,7 @@ dvbpsi_linkage_dr_t* dvbpsi_DecodeLinkageDr(dvbpsi_descriptor_t * p_descriptor)
{ {
p_decoded->i_handover_type = handover_type; p_decoded->i_handover_type = handover_type;
p_decoded->i_origin_type = origin_type; p_decoded->i_origin_type = origin_type;
i = 8;
if (handover_type > 0 && handover_type < 4) if (handover_type > 0 && handover_type < 4)
{ {
p_decoded->i_network_id = p_descriptor->p_data[8] << 8 p_decoded->i_network_id = p_descriptor->p_data[8] << 8
...@@ -183,6 +184,7 @@ dvbpsi_descriptor_t * dvbpsi_GenLinkageDr(dvbpsi_linkage_dr_t * p_decoded, ...@@ -183,6 +184,7 @@ dvbpsi_descriptor_t * dvbpsi_GenLinkageDr(dvbpsi_linkage_dr_t * p_decoded,
{ {
p_descriptor->p_data[7] = ( (p_decoded->i_handover_type & 0x0F) << 4 ) p_descriptor->p_data[7] = ( (p_decoded->i_handover_type & 0x0F) << 4 )
| 0x0E | ( p_decoded->i_origin_type & 0x01 ); | 0x0E | ( p_decoded->i_origin_type & 0x01 );
last_pos = 7;
if ((p_decoded->i_handover_type > 0) && if ((p_decoded->i_handover_type > 0) &&
(p_decoded->i_handover_type < 3 )) (p_decoded->i_handover_type < 3 ))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment