Skip to content
Snippets Groups Projects
Commit 32bd499b authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Steve Lhomme
Browse files

demux: ts: don't split pkt on overflow for aligned cases

useless as the startcode always lies in first bytes
if there's no PUSI violation
parent ea36b2b1
No related branches found
No related tags found
1 merge request!4825demux: ts: don't split pkt on overflow for aligned cases
Pipeline #430446 passed with stage
in 23 minutes and 39 seconds
......@@ -268,8 +268,9 @@ bool ts_pes_Gather( ts_pes_parse_callback *cb,
assert( p_pes->gather.i_data_size > p_pes->gather.i_gathered ||
p_pes->gather.i_data_size == 0 );
/* If we started reading a fixed size */
if( p_pes->gather.i_data_size > p_pes->gather.i_gathered && !b_single_payload )
/* If we started reading a fixed size that might not end on boundary */
if( unlikely(!b_aligned_ts_payload) &&
p_pes->gather.i_data_size > p_pes->gather.i_gathered )
{
const size_t i_remain = p_pes->gather.i_data_size - p_pes->gather.i_gathered;
/* Append whole block */
......
......@@ -173,7 +173,7 @@ int main(void)
ASSERT(output);
block_ChainProperties(output, &outputcount, &outputsize, NULL);
ASSERT(outputcount == 1);
ASSERT(outputsize == 256);
ASSERT(outputsize == 300);
RESET;
/* no packets assembly from unit start, early termination by fixed size */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment