Commit 25e9c515 authored by Marian Ďurkovič's avatar Marian Ďurkovič Committed by Christophe Massiot

* demux.c: Send dummy PAT containing no program for services which are currently inactive.

parent 4d395a60
......@@ -674,7 +674,26 @@ static void SendPAT( void )
for ( i = 0; i < i_nb_outputs; i++ )
{
if ( pp_outputs[i]->i_maddr && pp_outputs[i]->p_pat_section != NULL )
if ( !pp_outputs[i]->i_maddr )
continue;
if ( pp_outputs[i]->p_pat_section == NULL &&
pp_outputs[i]->p_sdt_section != NULL && p_current_pat != NULL )
{
dvbpsi_pat_t pat;
if ( b_unique_tsid )
dvbpsi_InitPAT( &pat, pp_outputs[i]->i_ts_id,
pp_outputs[i]->i_pat_version, 1 );
else
dvbpsi_InitPAT( &pat, p_current_pat->i_ts_id,
pp_outputs[i]->i_pat_version, 1 );
pp_outputs[i]->p_pat_section = dvbpsi_GenPATSections( &pat, 0 );
}
if ( pp_outputs[i]->p_pat_section != NULL )
{
block_t *p_block;
......@@ -1343,6 +1362,16 @@ static void SDTCallback( void *_unused, dvbpsi_sdt_t *p_sdt )
break;
}
}
if ( p_service == NULL )
{
if ( pp_outputs[i]->p_pat_section != NULL &&
pp_outputs[i]->p_pat_section->i_length == 9 )
{
dvbpsi_DeletePSISections( pp_outputs[i]->p_pat_section );
pp_outputs[i]->p_pat_section = NULL;
pp_outputs[i]->i_pat_version++;
}
}
}
dvbpsi_DeleteSDT( p_sdt );
......
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