[vlc-devel] [PATCH] vdpau/deinterlace: implement flushing

Rémi Denis-Courmont remi at remlab.net
Tue Oct 13 17:59:20 CEST 2020


Le tiistaina 13. lokakuuta 2020, 14.51.10 EEST Steve Lhomme a écrit :
> We should not rely on the old PTS values after a flush.
> ---
>  modules/hw/vdpau/deinterlace.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/modules/hw/vdpau/deinterlace.c b/modules/hw/vdpau/deinterlace.c
> index 2edcbab71db..842110c87aa 100644
> --- a/modules/hw/vdpau/deinterlace.c
> +++ b/modules/hw/vdpau/deinterlace.c
> @@ -96,6 +96,12 @@ static picture_t *Deinterlace(filter_t *filter, picture_t
> *src) return src;
>  }
> 
> +static void Flush(filter_t *filter)
> +{
> +    filter_sys_t *sys = filter->p_sys;
> +    sys->last_pts = VLC_TICK_INVALID;
> +}
> +

This might work, but only if we can assume that the mixer (chroma.c) is also 
flushed at the same time. Otherwise, the picture history won't be reset, and 
this will just reset the PTS.

>  static void Close(filter_t *filter)
>  {
>      vlc_video_context_Release(filter->vctx_out);
> @@ -103,6 +109,7 @@ static void Close(filter_t *filter)
> 
>  static const struct vlc_filter_operations filter_ops = {
>      .filter_video = Deinterlace, .close = Close,
> +    .flush = Flush,
>  };
> 
>  static int Open(filter_t *filter)


-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list