[vlc-devel] commit: Fix release of chroma module in vout core. I still get an " object is not (Antoine Cellerier )

git version control git at videolan.org
Sun Jun 22 23:06:35 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sun Jun 22 23:08:29 2008 +0200| [3333b45a525dc2f8f2645fa51280743cced63c56]

Fix release of chroma module in vout core. I still get an "object is not
attached" on vlc_object_detach although the object was attached
previously ... what could that be due to?

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index d61484f..710d860 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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 */




More information about the vlc-devel mailing list