Commit eee67fce authored by Benoit Steiner's avatar Benoit Steiner

Commit bis des modifications concernant l'initialisation du continuity
counter (ecrasees entre temps)
parent a6d3ffa1
......@@ -705,6 +705,16 @@ static __inline__ void input_DemuxTS( input_thread_t *p_input,
intf_DbgMsg("Duplicate packet received by TS demux\n");
b_trash = 1;
}
else if( p_es_descriptor->i_continuity_counter == 0xFF )
{
/* This means that the packet is the first one we receive for this
ES since the continuity counter ranges between 0 and 0x0F
excepts when it has been initialized by the input: Init the
counter to the correct value. */
intf_DbgMsg("First packet for PID %d received by TS demux\n",
p_es_descriptor->i_id);
p_es_descriptor->i_continuity_counter = (p[3] & 0x0f);
}
else
{
/* This can indicate that we missed a packet or that the
......
......@@ -135,7 +135,7 @@ int input_AddPgrmElem( input_thread_t *p_input, int i_current_id )
/* Initialise the demux */
p_input->p_es[i_es_loop].p_pes_packet = NULL;
p_input->p_es[i_es_loop].i_continuity_counter = 0;
p_input->p_es[i_es_loop].i_continuity_counter = 0xFF;
p_input->p_es[i_es_loop].b_random = 0;
/* Mark stream to be demultiplexed. */
......
......@@ -1253,6 +1253,7 @@ static es_descriptor_t* AddESDescr(input_thread_t* p_input,
p_es->i_type = 0; /* ??? */
p_es->b_psi = 0;
p_es->b_pcr = 0;
p_es->i_continuity_counter = 0xFF;
p_es->p_pes_packet = NULL;
// p_es->p_next_pes_packet = 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