[vlc-commits] input: missing lock on title update

Francois Cartegnie git at videolan.org
Tue Jan 14 14:46:43 CET 2020


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 20 22:15:43 2019 +0100| [4bf5b593d6b77fd9131f45e8cc6c563fdad0045a] | committer: Francois Cartegnie

input: missing lock on title update

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

 src/input/input.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/input/input.c b/src/input/input.c
index 75de527279..c97e78adea 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2502,6 +2502,7 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
     input_thread_private_t *priv = input_priv(p_input);
     input_source_t *in = priv->master;
 
+    vlc_mutex_lock( &priv->p_item->lock );
     /* Delete the preexisting titles */
     if( in->i_title > 0 )
     {
@@ -2521,6 +2522,8 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
     else
         in->b_title_demux = true;
 
+    vlc_mutex_unlock( &priv->p_item->lock );
+
     InitTitle( p_input );
 }
 



More information about the vlc-commits mailing list