]> git.sesse.net Git - vlc/commitdiff
Qt: epg: missing lock before es_out data access
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 10 Mar 2011 18:38:04 +0000 (19:38 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 15 Mar 2011 20:36:21 +0000 (21:36 +0100)
modules/gui/qt4/dialogs/epg.cpp

index 9d4b95ec12b43c51cacdc9c8143ac6581bffb6d6..4d23d2861f55f5af873e224512e575057ad5f69f 100644 (file)
@@ -129,10 +129,13 @@ void EpgDialog::updateInfos()
 {
     if( !THEMIM->getInput() ) return;
     timer->stop();
-    int i_nbitems = input_GetItem( THEMIM->getInput())->i_epg;
+    input_item_t *p_input_item = input_GetItem( THEMIM->getInput() );
+    vlc_mutex_lock(  & p_input_item->lock );
+    int i_nbitems = p_input_item->i_epg;
     if ( i_nbitems > 0 ) msg_Dbg( p_intf, "Found %i EPG items", i_nbitems );
-    epg->updateEPG( input_GetItem( THEMIM->getInput())->pp_epg,
-                    input_GetItem( THEMIM->getInput())->i_epg,
-                    input_GetItem( THEMIM->getInput())->i_type);
+    epg->updateEPG( p_input_item->pp_epg,
+                    p_input_item->i_epg,
+                    p_input_item->i_type);
+    vlc_mutex_unlock( & p_input_item->lock );
     if ( isVisible() ) timer->start();
 }