[vlc-commits] input: update title const ref on mainloop title update

Francois Cartegnie git at videolan.org
Mon Aug 28 09:30:42 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Aug 25 14:43:25 2017 +0200| [3affe2e6ff71539f4c916d4b38176f5cb4bc665f] | committer: Francois Cartegnie

input: update title const ref on mainloop title update

refs #18727

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

 src/input/input.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index ae5fe03f81..8e529b3274 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2269,7 +2269,8 @@ static void UpdateGenericFromDemux( input_thread_t *p_input )
 
 static void UpdateTitleListfromDemux( input_thread_t *p_input )
 {
-    input_source_t *in = input_priv(p_input)->master;
+    input_thread_private_t *priv = input_priv(p_input);
+    input_source_t *in = priv->master;
 
     /* Delete the preexisting titles */
     if( in->i_title > 0 )
@@ -2277,6 +2278,8 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
         for( int i = 0; i < in->i_title; i++ )
             vlc_input_title_Delete( in->title[i] );
         TAB_CLEAN( in->i_title, in->title );
+        priv->i_title = 0;
+        priv->title = NULL;
         in->b_title_demux = false;
     }
 



More information about the vlc-commits mailing list