Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/input/es_out.c b/src/input/es_out.c
- index 89bff72..34a246d 100644
- --- a/src/input/es_out.c
- +++ b/src/input/es_out.c
- @@ -159,6 +159,7 @@ struct es_out_sys_t
- /* Current preroll */
- mtime_t i_preroll_end;
- + bool b_prerolling;
- /* Used for buffering */
- bool b_buffering;
- @@ -322,6 +323,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
- p_sys->i_buffering_extra_stream = 0;
- p_sys->i_buffering_extra_system = 0;
- p_sys->i_preroll_end = -1;
- + p_sys->b_prerolling = false;
- p_sys->p_sout_record = NULL;
- @@ -622,6 +624,7 @@ static void EsOutChangePosition( es_out_t *out )
- p_sys->i_buffering_extra_stream = 0;
- p_sys->i_buffering_extra_system = 0;
- p_sys->i_preroll_end = -1;
- + p_sys->b_prerolling = false;
- }
- @@ -664,6 +667,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
- (int)(i_stream_duration/1000), (int)(i_system_duration/1000) );
- p_sys->b_buffering = false;
- p_sys->i_preroll_end = -1;
- + p_sys->b_prerolling = false;
- if( p_sys->i_buffering_extra_initial > 0 )
- {
- @@ -851,6 +855,7 @@ static void EsOutFrameNext( es_out_t *out )
- INPUT_RATE_DEFAULT / i_rate;
- p_sys->i_preroll_end = -1;
- + p_sys->b_prerolling = false;
- }
- static mtime_t EsOutGetBuffering( es_out_t *out )
- {
- @@ -1946,7 +1951,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
- vlc_mutex_lock( &p_sys->lock );
- /* Mark preroll blocks */
- - if( p_sys->i_preroll_end >= 0 )
- + if( p_sys->b_prerolling )
- {
- int64_t i_date = p_block->i_pts;
- if( p_block->i_pts <= VLC_TS_INVALID )
- @@ -1954,6 +1959,9 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
- if( i_date < p_sys->i_preroll_end )
- p_block->i_flags |= BLOCK_FLAG_PREROLL;
- + else
- + p_sys->b_prerolling = false;
- +
- }
- if( !es->p_dec )
- @@ -2440,6 +2448,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
- return VLC_EGENERIC;
- p_sys->i_preroll_end = i_date;
- + p_sys->b_prerolling = (i_date >= 0);
- return VLC_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement