Commit bad37ffd authored by Christophe Massiot's avatar Christophe Massiot

* modules/stream_out/bridge.c: Miscellaneous fixes to avoid late packets.

parent 7dfe6a21
......@@ -427,13 +427,14 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
b_no_es = VLC_FALSE;
while ( p_bridge->pp_es[i]->p_block != NULL
&& (p_bridge->pp_es[i]->p_block->i_dts < mdate()
&& (p_bridge->pp_es[i]->p_block->i_dts + p_sys->i_delay
< mdate()
|| p_bridge->pp_es[i]->p_block->i_dts + p_sys->i_delay
< p_bridge->pp_es[i]->i_last) )
{
block_t *p_block = p_bridge->pp_es[i]->p_block;
msg_Dbg( p_stream, "dropping a packet (" I64Fd ")",
p_bridge->pp_es[i]->i_last - p_block->i_dts );
mdate() - p_block->i_dts - p_sys->i_delay );
p_bridge->pp_es[i]->p_block
= p_bridge->pp_es[i]->p_block->p_next;
block_Release( p_block );
......@@ -452,7 +453,9 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
}
else
{
if ( p_bridge->pp_es[i]->p_block == NULL )
/* We need at least two packets to enter the mux. */
if ( p_bridge->pp_es[i]->p_block == NULL
|| p_bridge->pp_es[i]->p_block->p_next == NULL )
{
continue;
}
......
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