[vlc-commits] vout/wrapper: use data pointer in callback

Rémi Denis-Courmont git at videolan.org
Fri Jun 14 05:31:29 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 13 13:02:53 2019 +0300| [7171ece3aa28bf73bc6989532d111a57f1f69b05] | committer: Rémi Denis-Courmont

vout/wrapper: use data pointer in callback

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

 src/video_output/vout_wrapper.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 0662f4163c..494da61dc5 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -146,7 +146,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
 
 #ifdef _WIN32
     var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT);
-    var_AddCallback(vout, "video-wallpaper", Forward, NULL);
+    var_AddCallback(vout, "video-wallpaper", Forward, vd);
 #endif
     var_SetBool(VLC_OBJECT(vout), "viewpoint-changeable",
         sys->display->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR);
@@ -172,7 +172,7 @@ void vout_CloseWrapper(vout_thread_t *vout)
         picture_pool_Release(sys->decoder_pool);
 
 #ifdef _WIN32
-    var_DelCallback(vout, "video-wallpaper", Forward, NULL);
+    var_DelCallback(vout, "video-wallpaper", Forward, sys->display);
 #endif
     sys->decoder_pool = NULL; /* FIXME remove */
 
@@ -184,10 +184,10 @@ static int Forward(vlc_object_t *object, char const *var,
                    vlc_value_t oldval, vlc_value_t newval, void *data)
 {
     vout_thread_t *vout = (vout_thread_t*)object;
+    vout_display_t *vd = data;
 
     VLC_UNUSED(oldval);
-    VLC_UNUSED(data);
-    return var_Set(vout->p->display, var, newval);
+    return var_Set(vd, var, newval);
 }
 #endif
 



More information about the vlc-commits mailing list