[vlc-commits] vout: get window value explicitly

Rémi Denis-Courmont git at videolan.org
Tue Jan 30 20:45:18 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan 30 21:19:45 2018 +0200| [a6e826ec44bbb4238f8b6004b549f4d211a66f5a] | committer: Rémi Denis-Courmont

vout: get window value explicitly

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

 src/video_output/opengl.c | 4 +++-
 src/video_output/window.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index 99c830345c..c29464116e 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -135,8 +135,10 @@ vlc_gl_t *vlc_gl_surface_Create(vlc_object_t *obj,
         .sys = sys,
         .resized = vlc_gl_surface_ResizeNotify,
     };
+    char *modlist = var_InheritString(obj, "window");
 
-    vout_window_t *surface = vout_window_New(obj, "$window", cfg, &owner);
+    vout_window_t *surface = vout_window_New(obj, modlist, cfg, &owner);
+    free(modlist);
     if (surface == NULL)
         goto error;
     if (wp != NULL)
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 36aaa9d046..56d875e42c 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -182,6 +182,7 @@ vout_window_t *vout_display_window_New(vout_thread_t *vout,
     state->height = cfg->height;
     vlc_mutex_init(&state->lock);
 
+    char *modlist = var_InheritString(vout, "window");
     vout_window_owner_t owner = {
         .sys = state,
         .resized = vout_display_window_ResizeNotify,
@@ -190,7 +191,8 @@ vout_window_t *vout_display_window_New(vout_thread_t *vout,
     };
     vout_window_t *window;
 
-    window = vout_window_New((vlc_object_t *)vout, "$window", cfg, &owner);
+    window = vout_window_New((vlc_object_t *)vout, modlist, cfg, &owner);
+    free(modlist);
     if (window == NULL) {
         vlc_mutex_destroy(&state->lock);
         free(state);



More information about the vlc-commits mailing list