[vlc-commits] commit: Destroyed the spu object inside vout_Close. (Laurent Aimar )

git at videolan.org git at videolan.org
Tue May 25 22:01:22 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue May 25 22:00:35 2010 +0200| [e12f10f71223967156de8bd5f505fb5c4a2ace73] | committer: Laurent Aimar 

Destroyed the spu object inside vout_Close.

It avoids a vlc_object_detach.

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

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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index b3f54d7..aab5e0c 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -155,6 +155,7 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
     /* */
     if (vlc_clone(&vout->p->thread, Thread, vout,
                   VLC_THREAD_PRIORITY_OUTPUT)) {
+        spu_Destroy(vout->p->p_spu);
         vlc_object_release(vout);
         return NULL;
     }
@@ -228,12 +229,13 @@ void vout_Close(vout_thread_t *vout)
 
     if (vout->p->input)
         spu_Attach(vout->p->p_spu, vout->p->input, false);
-    vlc_object_detach(vout->p->p_spu);
 
     vout_snapshot_End(&vout->p->snapshot);
 
     vout_control_PushVoid(&vout->p->control, VOUT_CONTROL_CLEAN);
     vlc_join(vout->p->thread, NULL);
+
+    spu_Destroy(vout->p->p_spu);
 }
 
 /* */
@@ -246,9 +248,6 @@ static void VoutDestructor(vlc_object_t *object)
 
     free(vout->p->splitter_name);
 
-    /* */
-    spu_Destroy(vout->p->p_spu);
-
     /* Destroy the locks */
     vlc_mutex_destroy(&vout->p->picture_lock);
     vlc_mutex_destroy(&vout->p->vfilter_lock);



More information about the vlc-commits mailing list