[vlc-commits] blend: use a typed close callback in the operations structure

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct  9 10:48:35 2020 +0200| [8eddb17e9c003a67c5df05115f45e18b91675d36] | committer: Steve Lhomme

blend: use a typed close callback in the operations structure

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

 modules/video_filter/blend.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/video_filter/blend.cpp b/modules/video_filter/blend.cpp
index faf49cf482..dd5860022b 100644
--- a/modules/video_filter/blend.cpp
+++ b/modules/video_filter/blend.cpp
@@ -37,12 +37,12 @@
  * Module descriptor
  *****************************************************************************/
 static int  Open (vlc_object_t *);
-static void Close(vlc_object_t *);
+static void Close(filter_t *);
 
 vlc_module_begin()
     set_description(N_("Video pictures blending"))
     set_capability("video blending", 100)
-    set_callbacks(Open, Close)
+    set_callback(Open)
 vlc_module_end()
 
 static inline unsigned div255(unsigned v)
@@ -685,6 +685,7 @@ static const struct FilterOperationInitializer {
     FilterOperationInitializer()
     {
         ops.blend_video = DoBlend;
+        ops.close       = Close;
     };
 } filter_ops;
 
@@ -712,9 +713,8 @@ static int Open(vlc_object_t *object)
     return VLC_SUCCESS;
 }
 
-static void Close(vlc_object_t *object)
+static void Close(filter_t *filter)
 {
-    filter_t *filter = (filter_t *)object;
     filter_sys_t *p_sys = reinterpret_cast<filter_sys_t *>( filter->p_sys );
     delete p_sys;
 }



More information about the vlc-commits mailing list