[vlc-commits] es_out: specify the main source from input_EsOutNew()

Thomas Guillem git at videolan.org
Fri Feb 28 20:46:12 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb 27 18:23:25 2020 +0100| [4ee1897fb22408c5034bf04940dfcb3b80b55f17] | committer: Thomas Guillem

es_out: specify the main source from input_EsOutNew()

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

 src/input/es_out.c | 5 ++++-
 src/input/es_out.h | 2 +-
 src/input/input.c  | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 51be6e70fb..ba8bf98544 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -165,6 +165,8 @@ typedef struct
 {
     input_thread_t *p_input;
 
+    input_source_t *main_source;
+
     /* */
     vlc_mutex_t   lock;
 
@@ -474,7 +476,7 @@ static const struct es_out_callbacks es_out_cbs;
 /*****************************************************************************
  * input_EsOutNew:
  *****************************************************************************/
-es_out_t *input_EsOutNew( input_thread_t *p_input, float rate )
+es_out_t *input_EsOutNew( input_thread_t *p_input, input_source_t *main_source, float rate )
 {
     es_out_sys_t *p_sys = calloc( 1, sizeof( *p_sys ) );
     if( !p_sys )
@@ -484,6 +486,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, float rate )
 
     vlc_mutex_init( &p_sys->lock );
     p_sys->p_input = p_input;
+    p_sys->main_source = main_source;
 
     p_sys->b_active = false;
     p_sys->i_mode   = ES_OUT_MODE_NONE;
diff --git a/src/input/es_out.h b/src/input/es_out.h
index 953b6a576c..53b9bb0afa 100644
--- a/src/input/es_out.h
+++ b/src/input/es_out.h
@@ -258,7 +258,7 @@ static inline int es_out_SetVbiTransparency( es_out_t *p_out, vlc_es_id_t *id,
                                enabled );
 }
 
-es_out_t  *input_EsOutNew( input_thread_t *, float rate );
+es_out_t  *input_EsOutNew( input_thread_t *, input_source_t *main_source, float rate );
 es_out_t  *input_EsOutTimeshiftNew( input_thread_t *, es_out_t *, float i_rate );
 es_out_t  *input_EsOutSourceNew(es_out_t *master_out, input_source_t *in);
 
diff --git a/src/input/input.c b/src/input/input.c
index 2dfaeb603e..7f2f211fee 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -410,7 +410,7 @@ static input_thread_t *Create( vlc_object_t *p_parent,
     else
         priv->stats = NULL;
 
-    priv->p_es_out_display = input_EsOutNew( p_input, priv->rate );
+    priv->p_es_out_display = input_EsOutNew( p_input, priv->master, priv->rate );
     if( !priv->p_es_out_display )
     {
         Destroy( p_input );



More information about the vlc-commits mailing list