[vlc-devel] [PATCH 1/8] video output: misc cleaning

Steve Lhomme robux4 at ycbcr.xyz
Mon May 13 13:54:46 CEST 2019


Use the local variables when possible
+ more doc on the viewpoint event
---
 include/vlc_vout_display.h      | 2 +-
 modules/video_output/splitter.c | 4 ++--
 src/video_output/display.c      | 2 +-
 src/video_output/vout_wrapper.c | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index bdae03881c..97a6c96c1b 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -166,7 +166,7 @@ enum {
  * Only the transition will be retained and acted upon.
  */
 enum {
-    /* VR navigation */
+    /* VR navigation, vlc_viewpoint_t* */
     VOUT_DISPLAY_EVENT_VIEWPOINT_MOVED,
 };
 
diff --git a/modules/video_output/splitter.c b/modules/video_output/splitter.c
index 51f00b0c8e..de7396788d 100644
--- a/modules/video_output/splitter.c
+++ b/modules/video_output/splitter.c
@@ -309,8 +309,8 @@ static int vlc_vidsplit_Open(vout_display_t *vd,
         display = vlc_vidsplit_CreateDisplay(obj, &output->fmt, &vdcfg,
                                              modname);
         if (display == NULL) {
-            vout_window_Disable(vdcfg.window);
-            vout_window_Delete(vdcfg.window);
+            vout_window_Disable(part->window);
+            vout_window_Delete(part->window);
             vlc_sem_destroy(&part->lock);
             splitter->i_output = i;
             vlc_vidsplit_Close(vd);
diff --git a/src/video_output/display.c b/src/video_output/display.c
index e5c072ae2a..f295ad6731 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -767,7 +767,7 @@ vout_display_t *vout_display_New(vlc_object_t *parent,
     vd->sys = NULL;
     vd->owner = *owner;
 
-    osys->video_context.device = vlc_decoder_device_Create(vd->cfg->window);
+    osys->video_context.device = vlc_decoder_device_Create(osys->cfg.window);
     vlc_video_context *video_context = osys->video_context.device ?
         &osys->video_context : NULL;
 
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index e9c0a2c120..0662f4163c 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -82,7 +82,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
     else
         modlist = "splitter,none";
 
-    vd = vout_display_New(VLC_OBJECT(vout), &vout->p->original, cfg, modlist,
+    vd = vout_display_New(VLC_OBJECT(vout), &sys->original, cfg, modlist,
                           &owner);
     free(modlistbuf);
 
@@ -149,7 +149,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
     var_AddCallback(vout, "video-wallpaper", Forward, NULL);
 #endif
     var_SetBool(VLC_OBJECT(vout), "viewpoint-changeable",
-        vout->p->display->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR);
+        sys->display->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR);
     return VLC_SUCCESS;
 
 error:
-- 
2.17.1



More information about the vlc-devel mailing list