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

Steve Lhomme robux4 at ycbcr.xyz
Tue Oct 13 13:51:10 CEST 2020


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;
+}
+
 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)
-- 
2.26.2



More information about the vlc-devel mailing list