Commit 45ea4a2c authored by Christophe Massiot's avatar Christophe Massiot

ingests: fix wrong timestamp with more than 1 PCR/packet

parent 0a6dc337
......@@ -99,9 +99,6 @@ static void Output(void)
int i_nb_payloads = (i_ts_since_output + i_ts_in_payload - 1)
/ i_ts_in_payload;
if ( i_ts_since_output <= 0 )
return;
if ( b_init )
{
/* Emulate CBR */
......@@ -152,6 +149,12 @@ static void TSHandle( uint8_t *p_ts )
i_ts_since_output++;
int i_nb_payloads = (i_ts_since_output + i_ts_in_payload - 1)
/ i_ts_in_payload;
if ( i_nb_payloads <= 0 )
return;
if ( (i_pid == i_pcr_pid || i_pcr_pid == 8192)
&& ts_has_adaptation(p_ts) && ts_get_adaptation(p_ts)
&& tsaf_has_pcr(p_ts) )
......
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