[vlc-devel] commit: Do not lock the input while talking to D-Bus ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Sep 3 21:32:11 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Sep  3 21:11:52 2008 +0300| [20caf7888627c636c34dcaedfc1be00f5730950c] | committer: Rémi Denis-Courmont 

Do not lock the input while talking to D-Bus

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

 modules/misc/inhibit.c |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/modules/misc/inhibit.c b/modules/misc/inhibit.c
index b88b6a3..da182ae 100644
--- a/modules/misc/inhibit.c
+++ b/modules/misc/inhibit.c
@@ -230,28 +230,24 @@ static void Run( intf_thread_t *p_intf )
         p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
         if( p_input )
         {
-            if( PLAYING_S == p_input->i_state && !p_intf->p_sys->i_cookie )
+            int i_state = p_input->i_state;
+            vlc_object_release( p_input );
+
+            if( PLAYING_S == i_state && !p_intf->p_sys->i_cookie )
             {
                 if( !Inhibit( p_intf ) )
-                {
-                    vlc_object_release( p_input );
-                    goto end;
-                }
+                    break;
             }
             else if( p_intf->p_sys->i_cookie )
             {
                 if( !UnInhibit( p_intf ) )
-                {
-                    vlc_object_release( p_input );
-                    goto end;
-                }
+                    break;
             }
-            vlc_object_release( p_input );
         }
         else if( p_intf->p_sys->i_cookie )
         {
             if( !UnInhibit( p_intf ) )
-                goto end;
+                break;
         }
     }
 




More information about the vlc-devel mailing list