[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:53:30 2016 +0200| [0c9db6841e5e08a58da95f19a557b7501c85aaf7] | committer: Francois Cartegnie
access: dvb: scan: check linkage descriptor
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c9db6841e5e08a58da95f19a557b7501c85aaf7
---
modules/access/dvb/scan.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index b7e3033..d952b9a 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -813,12 +813,15 @@ static void NITCallBack( scan_session_t *p_session, dvbpsi_nit_t *p_nit )
{
if( p_dsc->i_tag == 0x41 )
{
+ dvbpsi_service_list_dr_t *p_sl = dvbpsi_DecodeServiceListDr( p_dsc );
msg_Dbg( p_obj, " * service list descriptor" );
- for( int i = 0; i < p_dsc->i_length/3; i++ )
+ for( uint8_t i = 0; p_sl && i < p_sl->i_service_count; i++ )
{
- uint16_t i_service_id = GetWBE( &p_dsc->p_data[3*i+0] );
- uint8_t i_service_type = p_dsc->p_data[3*i+2];
- msg_Dbg( p_obj, " * service_id=%d type=%d", i_service_id, i_service_type );
+ const uint16_t i_service_id = p_sl->i_service[i].i_service_id;
+ const uint8_t i_service_type = p_sl->i_service[i].i_service_type;
+ msg_Dbg( p_obj, " * service_id=%" PRIu16 " type=%" PRIu8,
+ i_service_id, i_service_type );
+
if( (ScanFindService( p_scan, 0, i_service_id ) == NULL) &&
scan_service_type( i_service_type ) != SERVICE_UNKNOWN )
{
More information about the vlc-commits
mailing list