[vlc-commits] access: dvb: scan: check linkage descriptor
Francois Cartegnie
git at videolan.org
Sun Apr 10 13:56:12 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 7 13:52:18 2016 +0200| [8760e02e9158c9fa14df0da18d3dd470456485ac] | committer: Francois Cartegnie
access: dvb: scan: check linkage descriptor
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8760e02e9158c9fa14df0da18d3dd470456485ac
---
modules/access/dvb/scan.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index 447d9e6..b7e3033 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -784,16 +784,15 @@ static void NITCallBack( scan_session_t *p_session, dvbpsi_nit_t *p_nit )
}
else if( p_dsc->i_tag == 0x4a )
{
- msg_Dbg( p_obj, " * linkage descriptor" );
- uint16_t i_ts_id = GetWBE( &p_dsc->p_data[0] );
- uint16_t i_on_id = GetWBE( &p_dsc->p_data[2] );
- uint16_t i_service_id = GetWBE( &p_dsc->p_data[4] );
- int i_linkage_type = p_dsc->p_data[6];
-
- msg_Dbg( p_obj, " * ts_id %d", i_ts_id );
- msg_Dbg( p_obj, " * on_id %d", i_on_id );
- msg_Dbg( p_obj, " * service_id %d", i_service_id );
- msg_Dbg( p_obj, " * linkage_type %d", i_linkage_type );
+ dvbpsi_linkage_dr_t *p_l = dvbpsi_DecodeLinkageDr( p_dsc );
+ if( p_l )
+ {
+ msg_Dbg( p_obj, " * linkage descriptor" );
+ msg_Dbg( p_obj, " * ts_id %" PRIu16, p_l->i_transport_stream_id );
+ msg_Dbg( p_obj, " * on_id %" PRIu16, p_l->i_original_network_id );
+ msg_Dbg( p_obj, " * service_id %" PRIu16, p_l->i_service_id );
+ msg_Dbg( p_obj, " * linkage_type %" PRIu8, p_l->i_linkage_type );
+ }
}
else
{
More information about the vlc-commits
mailing list