[vlc-devel] [PATCH] core: the earliest we can flush is VLC_TICK_0

Thomas Guillem thomas at gllm.fr
Tue Jul 3 08:27:23 CEST 2018


fine with me

On Tue, Jul 3, 2018, at 07:20, Steve Lhomme wrote:
> It's the same value as the hardcoded/indirect value. But it's more logical as
> it should be a reference to timestamped pictures. It flushes any picture later
> or equal to our internal 0, so anything not "negative".
> 
> This may keep some kind of pre-roll or negative timestamps (Matroska can have
> this) but this patch doesn't change the current behaviour.
> ---
>  src/input/decoder.c  | 6 ++----
>  src/input/resource.c | 2 +-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index 58ead05738..65bb1eda8d 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -151,8 +151,6 @@ struct decoder_owner
>  #define DECODER_SPU_VOUT_WAIT_DURATION   (CLOCK_FREQ/5)
>  #define BLOCK_FLAG_CORE_PRIVATE_RELOADED (1 << BLOCK_FLAG_CORE_PRIVATE_SHIFT)
>  
> -#define VLC_TS_OLDEST  (VLC_TICK_INVALID + 1)
> -
>  static inline struct decoder_owner *dec_get_owner( decoder_t *p_dec )
>  {
>      return container_of( p_dec, struct decoder_owner, dec );
> @@ -977,7 +975,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, 
> picture_t *p_picture,
>          msg_Dbg( p_dec, "end of video preroll" );
>  
>          if( p_vout )
> -            vout_Flush( p_vout, VLC_TS_OLDEST );
> +            vout_Flush( p_vout, VLC_TICK_0 );
>      }
>  
>      if( p_picture->date == VLC_TICK_INVALID )
> @@ -1465,7 +1463,7 @@ static void DecoderProcessFlush( decoder_t 
> *p_dec )
>      else if( p_dec->fmt_out.i_cat == VIDEO_ES )
>      {
>          if( p_owner->p_vout )
> -            vout_Flush( p_owner->p_vout, VLC_TS_OLDEST );
> +            vout_Flush( p_owner->p_vout, VLC_TICK_0 );
>      }
>      else if( p_dec->fmt_out.i_cat == SPU_ES )
>      {
> diff --git a/src/input/resource.c b/src/input/resource.c
> index f806cfeb2c..1c55114e08 100644
> --- a/src/input/resource.c
> +++ b/src/input/resource.c
> @@ -273,7 +273,7 @@ static vout_thread_t *RequestVout( input_resource_t 
> *p_resource,
>          else
>          {
>              msg_Dbg( p_resource->p_parent, "saving a free vout" );
> -            vout_Flush( p_vout, 1 );
> +            vout_Flush( p_vout, VLC_TICK_0 );
>              vout_FlushSubpictureChannel( p_vout, -1 );
>  
>              vout_configuration_t cfg = {
> -- 
> 2.17.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list