[vlc-commits] vout: create spu_t only when needed

Thomas Guillem git at videolan.org
Thu Jun 6 07:40:16 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jun  3 15:26:58 2019 +0200| [1b5ddf59860d800c5587be777c52533832ba8878] | committer: Thomas Guillem

vout: create spu_t only when needed

This avoid to load a "text renderer" module and scaler when the user doesn't
want any spu/osd. This happens when doing thumbnail from the medialibrary for
example.

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

 src/video_output/video_output.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 7c03c0b828..524135f013 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1829,7 +1829,8 @@ vout_thread_t *vout_Create(vlc_object_t *object)
 
     /* Initialize subpicture unit */
     vlc_mutex_init(&sys->spu_lock);
-    sys->spu = spu_Create(vout, vout);
+    sys->spu = var_InheritBool(vout, "spu") || var_InheritBool(vout, "osd") ?
+               spu_Create(vout, vout) : NULL;
 
     vout_control_Init(&sys->control);
 



More information about the vlc-commits mailing list