ts.c: Mask continuity counter when incrementing.

Previously, it seems, the continuity counter was incremented freely and the masking was 
done when using the counter. This is ok, but every now and then some pids would reach 
the special "pid unused" value and spawn a spurious debug message, which shouldn't 
happen with this fix
parent eb1d97c4
......@@ -885,7 +885,7 @@ static int DemuxFile( demux_t *p_demux )
i_diff = ( i_cc - p_pid->i_cc )&0x0f;
if( b_payload && i_diff == 1 )
{
p_pid->i_cc++;
p_pid->i_cc = ( p_pid->i_cc + 1 ) & 0xf;
}
else
{
......@@ -1694,7 +1694,7 @@ static vlc_bool_t GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
i_diff = ( i_cc - pid->i_cc )&0x0f;
if( b_payload && i_diff == 1 )
{
pid->i_cc++;
pid->i_cc = ( pid->i_cc + 1 ) & 0xf;
}
else
{
......
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