Fix release of chroma module in vout core. I still get an "object is not
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 22 Jun 2008 21:08:29 +0000 (23:08 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 22 Jun 2008 21:08:29 +0000 (23:08 +0200)
attached" on vlc_object_detach although the object was attached
previously ... what could that be due to?

src/video_output/video_output.c

index d61484f..710d860 100644 (file)
@@ -1147,6 +1147,8 @@ static void RunThread( vout_thread_t *p_vout)
             if( !p_vout->b_direct )
             {
                 module_Unneed( p_vout->p_chroma, p_vout->p_chroma->p_module );
+                vlc_object_detach( p_vout->p_chroma );
+                vlc_object_release( p_vout->p_chroma );
                 p_vout->p_chroma = NULL;
             }
 
@@ -1221,7 +1223,9 @@ static void EndThread( vout_thread_t *p_vout )
     if( !p_vout->b_direct )
     {
         module_Unneed( p_vout->p_chroma, p_vout->p_chroma->p_module );
-        p_vout->p_chroma->p_module = NULL;
+        vlc_object_detach( p_vout->p_chroma );
+        vlc_object_release( p_vout->p_chroma );
+        p_vout->p_chroma = NULL;
     }
 
     /* Destroy all remaining pictures */