Commit bd6deb1a authored by François Cartegnie's avatar François Cartegnie 🤞

access: dvb: scan: fix unused scanning parameter b_use_nit

parent d47a00db
......@@ -62,6 +62,8 @@ static void Close( vlc_object_t *p_this );
#define SCANLIST_TEXT N_("Scan tuning list")
#define SCANLIST_LONGTEXT N_("filename containing initial scan tuning data")
#define SCAN_NIT_TEXT N_("Use NIT for scanning services")
vlc_module_begin ()
set_shortname( N_("DVB") )
set_description( N_("DVB input with v4l2 support") )
......@@ -74,6 +76,7 @@ vlc_module_begin ()
true )
add_string( "dvb-scanlist", NULL, SCANLIST_TEXT, SCANLIST_LONGTEXT,
true )
add_bool( "dvb-scan-nit", true, SCAN_NIT_TEXT, NULL, true )
set_capability( "access", 0 )
add_shortcut( "dvb", /* Generic name */
......@@ -164,10 +167,13 @@ static int Open( vlc_object_t *p_this )
scan_parameter_Init( &parameter );
parameter.b_use_nit = var_GetBool( p_access, "dvb-scan-nit" );
msg_Dbg( p_access, "setting filter on PAT/NIT/SDT (DVB only)" );
FilterSet( p_access, 0x00, OTHER_TYPE ); // PAT
FilterSet( p_access, 0x10, OTHER_TYPE ); // NIT
FilterSet( p_access, 0x11, OTHER_TYPE ); // SDT
if( parameter.b_use_nit )
FilterSet( p_access, 0x10, OTHER_TYPE ); // NIT
if( FrontendFillScanParameter( p_access, &parameter ) ||
(p_scan = scan_New( VLC_OBJECT(p_access), &parameter )) == NULL )
......
......@@ -1431,7 +1431,7 @@ bool scan_session_Push( scan_session_t *p_scan, block_t *p_block )
if( p_scan->p_sdthandle )
dvbpsi_packet_push( p_scan->p_sdthandle, p_block->p_buffer );
}
else /*if( i_pid == p_scan->i_nit_pid )*/
else if( p_scan->b_use_nit ) /*if( i_pid == p_scan->i_nit_pid )*/
{
if( !p_scan->p_nithandle )
{
......@@ -1456,7 +1456,8 @@ bool scan_session_Push( scan_session_t *p_scan, block_t *p_block )
block_Release( p_block );
return p_scan->local.p_pat && p_scan->local.p_sdt && p_scan->local.p_nit;
return p_scan->local.p_pat && p_scan->local.p_sdt &&
(!p_scan->b_use_nit || p_scan->local.p_nit);
}
void scan_session_SetSNR( scan_session_t *p_session, int i_snr )
......
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