[vlc-commits] vout: keep a persistent configuration

Rémi Denis-Courmont git at videolan.org
Sat Jan 26 19:50:51 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 23 21:39:05 2019 +0200| [144f659a9f13ab7a71823e16c71a946e5333bc61] | committer: Rémi Denis-Courmont

vout: keep a persistent configuration

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

 src/video_output/video_output.c  | 8 ++++----
 src/video_output/vout_internal.h | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 4fcec2960b..7c9151475b 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -60,6 +60,7 @@
  *****************************************************************************/
 static void *Thread(void *);
 static void VoutDestructor(vlc_object_t *);
+static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg);
 
 /* Maximum delay between 2 displayed pictures.
  * XXX it is needed for now but should be removed in the long term.
@@ -202,6 +203,8 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
     else if (var_InheritBool(vout, "video-on-top"))
         vout_window_SetState(sys->window, VOUT_WINDOW_STATE_ABOVE);
 
+    VoutGetDisplayCfg(vout, &sys->display_cfg);
+
     /* */
     if (vlc_clone(&vout->p->thread, Thread, vout,
                   VLC_THREAD_PRIORITY_OUTPUT)) {
@@ -1650,10 +1653,7 @@ static void *Thread(void *object)
     vlc_tick_t deadline = VLC_TICK_INVALID;
     bool wait = false;
 
-    vout_display_cfg_t cfg_default;
-    VoutGetDisplayCfg(vout, &cfg_default);
-
-    if (ThreadStart(vout, &cfg_default))
+    if (ThreadStart(vout, &sys->display_cfg))
         goto out;
 
     for (;;) {
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index f1989585f4..0f869b524d 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -137,6 +137,7 @@ struct vout_thread_sys_t
     vlc_mutex_t     window_lock;
 
     /* Video output display */
+    vout_display_cfg_t display_cfg;
     vout_display_t *display;
 
     picture_pool_t  *private_pool;



More information about the vlc-commits mailing list