[vlc-commits] vdpau/deinterlace: use a Close callback in the operations structure

Steve Lhomme git at videolan.org
Mon Oct 12 15:56:00 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct  6 11:48:19 2020 +0200| [80c9de258e2a24f90c6f25fcb9b532f3397866dc] | committer: Steve Lhomme

vdpau/deinterlace: use a Close callback in the operations structure

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

 modules/hw/vdpau/deinterlace.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/modules/hw/vdpau/deinterlace.c b/modules/hw/vdpau/deinterlace.c
index 2a5a996f38..f14ed515a0 100644
--- a/modules/hw/vdpau/deinterlace.c
+++ b/modules/hw/vdpau/deinterlace.c
@@ -96,8 +96,14 @@ static picture_t *Deinterlace(filter_t *filter, picture_t *src)
     return src;
 }
 
+static void Close(filter_t *filter)
+{
+    vlc_video_context_Release(filter->vctx_out);
+    free(filter->p_sys);
+}
+
 static const struct vlc_filter_operations filter_ops = {
-    .filter_video = Deinterlace,
+    .filter_video = Deinterlace, .close = Close,
 };
 
 static int Open(vlc_object_t *obj)
@@ -130,20 +136,11 @@ static int Open(vlc_object_t *obj)
     return VLC_SUCCESS;
 }
 
-static void Close(vlc_object_t *obj)
-{
-    filter_t *filter = (filter_t *)obj;
-    filter_sys_t *sys = filter->p_sys;
-
-    vlc_video_context_Release(filter->vctx_out);
-    free(sys);
-}
-
 vlc_module_begin()
     set_description(N_("VDPAU deinterlacing filter"))
     set_capability("video filter", 0)
     set_category(CAT_VIDEO)
     set_subcategory(SUBCAT_VIDEO_VFILTER)
-    set_callbacks(Open, Close)
+    set_callback(Open)
     add_shortcut ("deinterlace")
 vlc_module_end()



More information about the vlc-commits mailing list