[vlc-commits] i420_nv12: set the Close callback in the generated operations structure
Steve Lhomme
git at videolan.org
Mon Oct 12 15:55:54 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 6 11:11:40 2020 +0200| [ff5b5821d678f2eb3ae4426998a89c61316313a4] | committer: Steve Lhomme
i420_nv12: set the Close callback in the generated operations structure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff5b5821d678f2eb3ae4426998a89c61316313a4
---
modules/video_chroma/i420_nv12.c | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/modules/video_chroma/i420_nv12.c b/modules/video_chroma/i420_nv12.c
index fe27022517..a54e03a517 100644
--- a/modules/video_chroma/i420_nv12.c
+++ b/modules/video_chroma/i420_nv12.c
@@ -128,12 +128,18 @@ static void P010_I42010B( filter_t *p_filter, picture_t *p_src,
}
/* Following functions are local */
-VIDEO_FILTER_WRAPPER( I420_NV12 )
-VIDEO_FILTER_WRAPPER( YV12_NV12 )
-VIDEO_FILTER_WRAPPER( NV12_I420 )
-VIDEO_FILTER_WRAPPER( NV12_YV12 )
-VIDEO_FILTER_WRAPPER( I42010B_P010 )
-VIDEO_FILTER_WRAPPER( P010_I42010B )
+static void Delete(filter_t *p_filter)
+{
+ filter_sys_t *p_sys = p_filter->p_sys;
+ CopyCleanCache( &p_sys->cache );
+}
+
+VIDEO_FILTER_WRAPPER_CLOSE( I420_NV12, Delete )
+VIDEO_FILTER_WRAPPER_CLOSE( YV12_NV12, Delete )
+VIDEO_FILTER_WRAPPER_CLOSE( NV12_I420, Delete )
+VIDEO_FILTER_WRAPPER_CLOSE( NV12_YV12, Delete )
+VIDEO_FILTER_WRAPPER_CLOSE( I42010B_P010, Delete )
+VIDEO_FILTER_WRAPPER_CLOSE( P010_I42010B, Delete )
/*****************************************************************************
* Create: allocate a chroma function
@@ -223,18 +229,11 @@ static int Create( vlc_object_t *p_this )
return 0;
}
-static void Delete(vlc_object_t *p_this)
-{
- filter_t *p_filter = (filter_t *)p_this;
- filter_sys_t *p_sys = p_filter->p_sys;
- CopyCleanCache( &p_sys->cache );
-}
-
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin ()
set_description( N_("YUV planar to semiplanar conversions") )
set_capability( "video converter", 160 )
- set_callbacks( Create, Delete )
+ set_callback( Create )
vlc_module_end ()
More information about the vlc-commits
mailing list