]> git.sesse.net Git - vlc/commitdiff
Check properly if vout is dying - CID 7
authorRafaël Carré <funman@videolan.org>
Fri, 30 May 2008 13:54:37 +0000 (15:54 +0200)
committerRafaël Carré <funman@videolan.org>
Fri, 30 May 2008 13:54:37 +0000 (15:54 +0200)
modules/codec/cmml/intf.c

index 6ca85e01941d040f002b7f89ded6979e0bdc6c04..4a13d427c53a5c33c4b514bc9b0e6442022a7712 100644 (file)
@@ -188,17 +188,16 @@ static void RunIntf( intf_thread_t *p_intf )
     msg_Dbg( p_intf, "CMML intf initialized" );
 #endif
 
-    /* if video output is dying, disassociate ourselves from it */
-    if( p_vout && p_vout->b_die )
-    {
-        var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
-        vlc_object_release( p_vout );
-        p_vout = NULL;
-    }
-
     /* Main loop */
     while( !p_intf->b_die )
     {
+        /* if video output is dying, disassociate ourselves from it */
+        if( p_vout && p_vout->b_die )
+        {
+            var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
+            vlc_object_release( p_vout );
+            p_vout = NULL;
+        }
 
         /* find a video output if we currently don't have one */
         if( p_vout == NULL )