Commit 3ed3f312 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/dvbpsi.c: Do not check continuity counter when this PID has not been seen before

Do not check continuity counter when this PID has not been seen before.
This used to produce false positives.
parent 9f095dd9
......@@ -235,6 +235,11 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
}
/* Continuity check */
bool b_first = (p_decoder->i_continuity_counter == 0xFF);
if (b_first)
p_decoder->i_continuity_counter = p_data[3] & 0xf;
else
{
i_expected_counter = (p_decoder->i_continuity_counter + 1) & 0xf;
p_decoder->i_continuity_counter = p_data[3] & 0xf;
......@@ -261,6 +266,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
p_decoder->p_current_section = NULL;
}
}
}
/* Return if no payload in the TS packet */
if (!(p_data[3] & 0x10))
......
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