[vlc-devel] commit: Fixed vout leak. (Laurent Aimar )

git version control git at videolan.org
Thu Dec 4 20:48:04 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Dec  3 22:44:18 2008 +0100| [f6803fd0f75b89b2566dc4aa9dd3ebd10554b0ad] | committer: Laurent Aimar 

Fixed vout leak.

The spu has to be detached from the vout object, otherwise the vout will
never be destroyed.

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 9790f77..8d5b254 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1416,8 +1416,9 @@ static void EndThread( vout_thread_t *p_vout )
 
     /* FIXME does that function *really* need to be called inside the thread ? */
 
-    /* Destroy subpicture unit */
+    /* Detach subpicture unit from both input and vout */
     spu_Attach( p_vout->p_spu, VLC_OBJECT(p_vout), false );
+    vlc_object_detach( p_vout->p_spu );
 
     /* Destroy the video filters2 */
     filter_chain_Delete( p_vout->p->p_vf2_chain );




More information about the vlc-devel mailing list