vlc | branch: master | Victorien Le Couviour--Tuffet 
<victorien.lecouviour.tuf...@gmail.com> | Thu Jul  6 18:11:44 2017 +0200| 
[9381695ab7e7d30db4107c37fa658a9653c037e9] | committer: Thomas Guillem

hw: vaapi-deint: add flush callback

Signed-off-by: Thomas Guillem <tho...@gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9381695ab7e7d30db4107c37fa658a9653c037e9
---

 modules/hw/vaapi/filters.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
index db3b3a84cb..6d124b5ab9 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -873,6 +873,19 @@ Deinterlace(filter_t * filter, picture_t * src)
     return dest;
 }
 
+static void
+Deinterlace_Flush(filter_t *filter)
+{
+    struct deint_data *const    p_deint_data = filter->p_sys->p_data;
+
+    while (p_deint_data->history.num_pics)
+    {
+        picture_t *     pic =
+            p_deint_data->history.pp_pics[--p_deint_data->history.num_pics];
+        picture_Release(pic);
+    }
+}
+
 static inline bool
 OpenDeinterlace_IsValidType(filter_t * filter,
                             VAProcDeinterlacingType const caps[],
@@ -1028,6 +1041,7 @@ OpenDeinterlace(vlc_object_t * obj)
         goto error;
 
     filter->pf_video_filter = Deinterlace;
+    filter->pf_flush = Deinterlace_Flush;
 
     return VLC_SUCCESS;
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to