Commit 73dea049 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ts: replace SL conditional handling with flag

parent bbf5b54d
...@@ -263,6 +263,7 @@ typedef struct ...@@ -263,6 +263,7 @@ typedef struct
int i_data_gathered; int i_data_gathered;
block_t *p_data; block_t *p_data;
block_t **pp_last; block_t **pp_last;
bool b_always_receive;
ts_sections_processor_t *p_sections_proc; ts_sections_processor_t *p_sections_proc;
block_t * p_prepcr_outqueue; block_t * p_prepcr_outqueue;
...@@ -1447,17 +1448,9 @@ static void UpdatePESFilters( demux_t *p_demux, bool b_all ) ...@@ -1447,17 +1448,9 @@ static void UpdatePESFilters( demux_t *p_demux, bool b_all )
ts_pes_t *p_pes = espid->u.p_pes; ts_pes_t *p_pes = espid->u.p_pes;
bool b_stream_selected = true; bool b_stream_selected = true;
if( !b_all ) if( !p_pes->b_always_receive && !b_all )
HasSelectedES( p_demux->out, p_pes->p_es, p_pmt, &b_stream_selected ); HasSelectedES( p_demux->out, p_pes->p_es, p_pmt, &b_stream_selected );
if( p_pes->p_es->fmt.i_cat == UNKNOWN_ES )
{
if( p_pes->i_stream_type == 0x13 ) /* Object channel */
b_stream_selected = true;
else if( !p_sys->b_es_all )
b_stream_selected = false;
}
if( b_stream_selected ) if( b_stream_selected )
{ {
msg_Dbg( p_demux, "enabling pid %d from program %d", espid->i_pid, p_pmt->i_number ); msg_Dbg( p_demux, "enabling pid %d from program %d", espid->i_pid, p_pmt->i_number );
...@@ -4334,6 +4327,7 @@ static void SetupISO14496Descriptors( demux_t *p_demux, ts_pes_t *p_pes, ...@@ -4334,6 +4327,7 @@ static void SetupISO14496Descriptors( demux_t *p_demux, ts_pes_t *p_pes,
msg_Dbg( p_demux, " - found SL_descriptor mapping es_id=%"PRIu16, p_es->i_sl_es_id ); msg_Dbg( p_demux, " - found SL_descriptor mapping es_id=%"PRIu16, p_es->i_sl_es_id );
ts_sections_processor_Add( &p_pes->p_sections_proc, 0x05, 0x13, ts_sections_processor_Add( &p_pes->p_sections_proc, 0x05, 0x13,
false, SLPackets_Section_Handler ); false, SLPackets_Section_Handler );
p_pes->b_always_receive = true;
} }
break; break;
default: default:
...@@ -5965,6 +5959,7 @@ static ts_pes_t *ts_pes_New( demux_t *p_demux, ts_pmt_t *p_program ) ...@@ -5965,6 +5959,7 @@ static ts_pes_t *ts_pes_New( demux_t *p_demux, ts_pmt_t *p_program )
pes->i_data_gathered = 0; pes->i_data_gathered = 0;
pes->p_data = NULL; pes->p_data = NULL;
pes->pp_last = &pes->p_data; pes->pp_last = &pes->p_data;
pes->b_always_receive = false;
pes->p_sections_proc = NULL; pes->p_sections_proc = NULL;
pes->p_prepcr_outqueue = NULL; pes->p_prepcr_outqueue = NULL;
pes->sl.p_data = NULL; pes->sl.p_data = NULL;
......
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