Commit 4d4f76fd authored by Laurent Aimar's avatar Laurent Aimar

Partially fixed preroll support.

parent 0b2d112a
...@@ -588,6 +588,8 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced ) ...@@ -588,6 +588,8 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
{ {
es_out_id_t *p_es = p_sys->es[i]; es_out_id_t *p_es = p_sys->es[i];
p_es->i_preroll_end = -1;
if( !p_es->p_dec ) if( !p_es->p_dec )
continue; continue;
input_DecoderWaitBuffering( p_es->p_dec ); input_DecoderWaitBuffering( p_es->p_dec );
...@@ -601,7 +603,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced ) ...@@ -601,7 +603,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
const mtime_t i_ts_delay = 10*1000 + /* FIXME CLEANUP thread wake up time*/ const mtime_t i_ts_delay = 10*1000 + /* FIXME CLEANUP thread wake up time*/
mdate(); mdate();
//msg_Dbg( p_sys->p_input, "==> %lld", i_ts_delay - p_sys->p_input->i_pts_delay ); //msg_Dbg( p_sys->p_input, "==> %lld", i_ts_delay - p_sys->p_input->i_pts_delay );
input_clock_ChangeSystemOrigin( p_sys->p_pgrm->p_clock, i_ts_delay - p_sys->p_input->i_pts_delay ); input_clock_ChangeSystemOrigin( p_sys->p_pgrm->p_clock, i_ts_delay - p_sys->p_input->i_pts_delay - i_preroll_duration );
for( int i = 0; i < p_sys->i_es; i++ ) for( int i = 0; i < p_sys->i_es; i++ )
{ {
...@@ -1683,8 +1685,6 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block ) ...@@ -1683,8 +1685,6 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
if( i_date < es->i_preroll_end ) if( i_date < es->i_preroll_end )
p_block->i_flags |= BLOCK_FLAG_PREROLL; p_block->i_flags |= BLOCK_FLAG_PREROLL;
else
es->i_preroll_end = -1;
} }
p_block->i_rate = 0; p_block->i_rate = 0;
......
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