[vlc-devel] [PATCH] input: only insert vout title once

Francois Cartegnie fcvlcdev at free.fr
Mon Jul 25 16:21:54 CEST 2016


On vout replacement, restart or reuse,
the vout title is always redisplayed for
the same item.
---
 src/input/resource.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index 0021cec..ed3082c 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -70,6 +70,8 @@ struct input_resource_t
 
     vout_thread_t   **pp_vout;
     int             i_vout;
+    /* Do not display title multiple times when vout is replaced or reused */
+    bool            b_title_displayed;
 
     bool            b_aout_busy;
     audio_output_t *p_aout;
@@ -151,10 +153,10 @@ static void DestroyVout( input_resource_t *p_resource )
 static void DisplayVoutTitle( input_resource_t *p_resource,
                               vout_thread_t *p_vout )
 {
-    if( p_resource->p_input == NULL )
+    if( p_resource->p_input == NULL || p_resource->b_title_displayed )
         return;
 
-    /* TODO display the title only one time for the same input ? */
+    p_resource->b_title_displayed = true;
 
     input_item_t *p_item = input_GetItem( p_resource->p_input );
 
-- 
2.7.4



More information about the vlc-devel mailing list