[vlc-commits] splitter: track window separately from display

Rémi Denis-Courmont git at videolan.org
Sun Jan 13 14:44:47 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 13 15:11:27 2019 +0200| [2129e261895b39667caa183b2b1f264355e3b847] | committer: Rémi Denis-Courmont

splitter: track window separately from display

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

 modules/video_output/splitter.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index 4cd150cd76..8a6fcd1244 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -35,6 +35,7 @@
 #include <vlc_video_splitter.h>
 
 struct vlc_vidsplit_part {
+    vout_window_t *window;
     vout_display_t *display;
     vlc_sem_t lock;
     unsigned width;
@@ -104,11 +105,10 @@ static void vlc_vidsplit_Close(vout_display_t *vd)
 
     for (int i = 0; i < n; i++) {
         struct vlc_vidsplit_part *part = &sys->parts[i];
-        vout_window_t *wnd = part->display->cfg->window;
 
         vout_display_Delete(part->display);
-        vout_window_Disable(wnd);
-        vout_window_Delete(wnd);
+        vout_window_Disable(part->window);
+        vout_window_Delete(part->window);
         vlc_sem_destroy(&part->lock);
     }
 
@@ -231,14 +231,15 @@ static int vlc_vidsplit_Open(vout_display_t *vd,
         part->width = 1;
         part->height = 1;
 
-        vdcfg.window = video_splitter_CreateWindow(obj, &vdcfg, &output->fmt,
+        part->window = video_splitter_CreateWindow(obj, &vdcfg, &output->fmt,
                                                    part);
-        if (vdcfg.window == NULL) {
+        if (part->window == NULL) {
             splitter->i_output = i;
             vlc_vidsplit_Close(vd);
             return VLC_EGENERIC;
         }
 
+        vdcfg.window = part->window;
         display = vlc_vidsplit_CreateDisplay(obj, &output->fmt, &vdcfg,
                                              modname);
         if (display == NULL) {



More information about the vlc-commits mailing list