[vlc-commits] access: dvb: scan: check delivery descriptors
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:54:43 2016 +0200| [18e19eb78ba69819ddf27a3914c2dbe7645558fe] | committer: Francois Cartegnie
access: dvb: scan: check delivery descriptors
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18e19eb78ba69819ddf27a3914c2dbe7645558fe
---
modules/access/dvb/scan.c | 40 +++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index d952b9a..c5e7aa8 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -839,27 +839,33 @@ static void NITCallBack( scan_session_t *p_session, dvbpsi_nit_t *p_nit )
else if( p_dsc->i_tag == 0x5a )
{
dvbpsi_terr_deliv_sys_dr_t *p_t = dvbpsi_DecodeTerrDelivSysDr( p_dsc );
- msg_Dbg( p_obj, " * terrestrial delivery system" );
- msg_Dbg( p_obj, " * centre_frequency 0x%x", p_t->i_centre_frequency );
- msg_Dbg( p_obj, " * bandwidth %d", 8 - p_t->i_bandwidth );
- msg_Dbg( p_obj, " * constellation %d", p_t->i_constellation );
- msg_Dbg( p_obj, " * hierarchy %d", p_t->i_hierarchy_information );
- msg_Dbg( p_obj, " * code_rate hp %d lp %d", p_t->i_code_rate_hp_stream, p_t->i_code_rate_lp_stream );
- msg_Dbg( p_obj, " * guard_interval %d", p_t->i_guard_interval );
- msg_Dbg( p_obj, " * transmission_mode %d", p_t->i_transmission_mode );
- msg_Dbg( p_obj, " * other_frequency_flag %d", p_t->i_other_frequency_flag );
+ if( p_t )
+ {
+ msg_Dbg( p_obj, " * terrestrial delivery system" );
+ msg_Dbg( p_obj, " * centre_frequency 0x%x", p_t->i_centre_frequency );
+ msg_Dbg( p_obj, " * bandwidth %d", 8 - p_t->i_bandwidth );
+ msg_Dbg( p_obj, " * constellation %d", p_t->i_constellation );
+ msg_Dbg( p_obj, " * hierarchy %d", p_t->i_hierarchy_information );
+ msg_Dbg( p_obj, " * code_rate hp %d lp %d", p_t->i_code_rate_hp_stream, p_t->i_code_rate_lp_stream );
+ msg_Dbg( p_obj, " * guard_interval %d", p_t->i_guard_interval );
+ msg_Dbg( p_obj, " * transmission_mode %d", p_t->i_transmission_mode );
+ msg_Dbg( p_obj, " * other_frequency_flag %d", p_t->i_other_frequency_flag );
+ }
}
else if( p_dsc->i_tag == 0x44 )
{
dvbpsi_cable_deliv_sys_dr_t *p_t = dvbpsi_DecodeCableDelivSysDr( p_dsc );
- msg_Dbg( p_obj, " * Cable delivery system");
-
- cfg.i_frequency = decode_BCD( p_t->i_frequency ) * 100;
- msg_Dbg( p_obj, " * frequency %d", cfg.i_frequency );
- cfg.i_symbolrate = decode_BCD( p_t->i_symbol_rate ) * 100;
- msg_Dbg( p_obj, " * symbolrate %u", cfg.i_symbolrate );
- cfg.i_modulation = (8 << p_t->i_modulation);
- msg_Dbg( p_obj, " * modulation %u", cfg.i_modulation );
+ if( p_t )
+ {
+ msg_Dbg( p_obj, " * Cable delivery system");
+
+ cfg.i_frequency = decode_BCD( p_t->i_frequency ) * 100;
+ msg_Dbg( p_obj, " * frequency %d", cfg.i_frequency );
+ cfg.i_symbolrate = decode_BCD( p_t->i_symbol_rate ) * 100;
+ msg_Dbg( p_obj, " * symbolrate %u", cfg.i_symbolrate );
+ cfg.i_modulation = (8 << p_t->i_modulation);
+ msg_Dbg( p_obj, " * modulation %u", cfg.i_modulation );
+ }
}
else if( p_dsc->i_tag == 0x5f )
{
More information about the vlc-commits
mailing list