Commit a04a4170 authored by massiot's avatar massiot

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

   currently inactive, patch by Marian.


git-svn-id: svn://svn.videolan.org/dvblast/trunk@58 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent 2736f403
...@@ -674,7 +674,26 @@ static void SendPAT( void ) ...@@ -674,7 +674,26 @@ static void SendPAT( void )
for ( i = 0; i < i_nb_outputs; i++ ) 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; block_t *p_block;
...@@ -1343,6 +1362,16 @@ static void SDTCallback( void *_unused, dvbpsi_sdt_t *p_sdt ) ...@@ -1343,6 +1362,16 @@ static void SDTCallback( void *_unused, dvbpsi_sdt_t *p_sdt )
break; 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 ); 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