[vlc-devel] commit: Fix deadlock when quitting the dummy interface ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Jun 1 10:33:01 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jun  1 11:34:41 2008 +0300| [2e40b4c523f32cfeca90434c63c705b467863393]

Fix deadlock when quitting the dummy interface

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

 src/interface/interface.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index 9ec0628..7a39c07 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -217,7 +217,12 @@ static void RunInterface( intf_thread_t *p_intf )
         if( p_intf->pf_run )
             p_intf->pf_run( p_intf );
         else
-            while( vlc_object_lock_and_wait( p_intf ) == 0 );
+        {
+            vlc_object_lock( p_intf );
+            while( vlc_object_alive( p_intf ) )
+                vlc_object_wait( p_intf );
+            vlc_object_unlock( p_intf );
+        }
 
         /* Reset play on start status */
         p_intf->b_play = false;




More information about the vlc-devel mailing list