Commit 9fd2410f authored by Marian Ďurkovič's avatar Marian Ďurkovič Committed by Christophe Massiot

* demux.c: Do not make SDT depend on PMT existence.

parent fc8f9590
...@@ -94,6 +94,7 @@ static int SIDIsSelected( uint16_t i_sid ); ...@@ -94,6 +94,7 @@ static int SIDIsSelected( uint16_t i_sid );
int PIDWouldBeSelected( dvbpsi_pmt_es_t *p_es ); int PIDWouldBeSelected( dvbpsi_pmt_es_t *p_es );
static int PMTNeedsDescrambling( dvbpsi_pmt_t *p_pmt ); static int PMTNeedsDescrambling( dvbpsi_pmt_t *p_pmt );
static void SendPAT( void ); static void SendPAT( void );
static void SendSDT( void );
static void SendPMT( sid_t *p_sid ); static void SendPMT( sid_t *p_sid );
static void NewPAT( output_t *p_output ); static void NewPAT( output_t *p_output );
static void NewPMT( output_t *p_output ); static void NewPMT( output_t *p_output );
...@@ -206,6 +207,8 @@ static void demux_Handle( block_t *p_ts ) ...@@ -206,6 +207,8 @@ static void demux_Handle( block_t *p_ts )
else if ( b_enable_epg && i_pid == SDT_PID ) else if ( b_enable_epg && i_pid == SDT_PID )
{ {
dvbpsi_PushPacket( p_sdt_dvbpsi_handle, p_ts->p_ts ); dvbpsi_PushPacket( p_sdt_dvbpsi_handle, p_ts->p_ts );
if ( block_UnitStart( p_ts ) )
SendSDT();
} }
else if ( b_enable_epg && i_pid == TDT_PID ) else if ( b_enable_epg && i_pid == TDT_PID )
{ {
...@@ -688,6 +691,32 @@ static void SendPAT( void ) ...@@ -688,6 +691,32 @@ static void SendPAT( void )
} }
} }
/*****************************************************************************
* SendSDT
*****************************************************************************/
static void SendSDT( void )
{
int i;
for ( i = 0; i < i_nb_outputs; i++ )
{
if ( pp_outputs[i]->i_maddr && pp_outputs[i]->p_sdt_section != NULL )
{
block_t *p_block;
p_block = WritePSISection( pp_outputs[i]->p_sdt_section, SDT_PID,
&pp_outputs[i]->i_sdt_cc );
while ( p_block != NULL )
{
block_t *p_next = p_block->p_next;
p_block->i_refcount--;
output_Put( pp_outputs[i], p_block );
p_block = p_next;
}
}
}
}
/***************************************************************************** /*****************************************************************************
* SendPMT * SendPMT
*****************************************************************************/ *****************************************************************************/
...@@ -714,22 +743,6 @@ static void SendPMT( sid_t *p_sid ) ...@@ -714,22 +743,6 @@ static void SendPMT( sid_t *p_sid )
p_block = p_next; p_block = p_next;
} }
} }
if ( pp_outputs[i]->p_sdt_section != NULL )
{
block_t *p_block;
p_block = WritePSISection( pp_outputs[i]->p_sdt_section,
SDT_PID,
&pp_outputs[i]->i_sdt_cc );
while ( p_block != NULL )
{
block_t *p_next = p_block->p_next;
p_block->i_refcount--;
output_Put( pp_outputs[i], p_block );
p_block = p_next;
}
}
} }
} }
} }
......
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