[vlc-devel] [PATCH 1/5] blend: rename filter_sys_t to filter_blend

Thomas Guillem thomas at gllm.fr
Wed Mar 7 17:31:55 CET 2018


ODR related.
---
 modules/video_filter/blend.cpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/video_filter/blend.cpp b/modules/video_filter/blend.cpp
index afb4b4e474..385e6c4c89 100644
--- a/modules/video_filter/blend.cpp
+++ b/modules/video_filter/blend.cpp
@@ -625,8 +625,8 @@ static const struct {
 #undef YUV
 };
 
-struct filter_sys_t {
-    filter_sys_t() : blend(NULL)
+struct filter_blend {
+    filter_blend() : blend(NULL)
     {
     }
     blend_function_t blend;
@@ -639,7 +639,7 @@ static void Blend(filter_t *filter,
                   picture_t *dst, const picture_t *src,
                   int x_offset, int y_offset, int alpha)
 {
-    filter_sys_t *sys = filter->p_sys;
+    filter_blend *sys = reinterpret_cast<filter_blend *>(filter->p_sys);
 
     if( x_offset < 0 || y_offset < 0 )
     {
@@ -672,7 +672,7 @@ static int Open(vlc_object_t *object)
     const vlc_fourcc_t src = filter->fmt_in.video.i_chroma;
     const vlc_fourcc_t dst = filter->fmt_out.video.i_chroma;
 
-    filter_sys_t *sys = new filter_sys_t();
+    filter_blend *sys = new filter_blend();
     for (size_t i = 0; i < sizeof(blends) / sizeof(*blends); i++) {
         if (blends[i].src == src && blends[i].dst == dst)
             sys->blend = blends[i].blend;
@@ -686,13 +686,14 @@ static int Open(vlc_object_t *object)
     }
 
     filter->pf_video_blend = Blend;
-    filter->p_sys          = sys;
+    filter->p_sys          = reinterpret_cast<filter_sys_t*>(sys);
     return VLC_SUCCESS;
 }
 
 static void Close(vlc_object_t *object)
 {
     filter_t *filter = (filter_t *)object;
-    delete filter->p_sys;
+    filter_blend *sys = reinterpret_cast<filter_blend *>(filter->p_sys);
+    delete sys;
 }
 
-- 
2.11.0



More information about the vlc-devel mailing list