[vlc-devel] commit: input_DetachSout corrections ( Sébastien Escudier )

git version control git at videolan.org
Tue Nov 4 16:58:44 CET 2008


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Tue Nov  4 16:12:58 2008 +0100| [9119f4fae02b845f1661e1ac3f0794c759725ebf] | committer: Rémi Denis-Courmont 

input_DetachSout corrections

Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>

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

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

diff --git a/src/input/input.c b/src/input/input.c
index a147b2e..4f37c84 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -490,6 +490,7 @@ void input_StopThread( input_thread_t *p_input )
 
 sout_instance_t * input_DetachSout( input_thread_t *p_input )
 {
+    assert( p_input->b_dead );
     sout_instance_t *p_sout = p_input->p->p_sout;
     vlc_object_detach( p_sout );
     p_input->p->p_sout = NULL;
diff --git a/src/input/vlm.c b/src/input/vlm.c
index ed265a1..42a7036 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -768,8 +768,8 @@ static void vlm_MediaInstanceDelete( vlm_media_instance_sys_t *p_instance )
     if( p_input )
     {
         input_StopThread( p_input );
-        p_instance->p_sout = input_DetachSout( p_input );
         vlc_thread_join( p_input );
+        p_instance->p_sout = input_DetachSout( p_input );
         vlc_object_release( p_input );
     }
     if( p_instance->p_sout )
@@ -846,8 +846,8 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
         }
 
         input_StopThread( p_input );
-        p_instance->p_sout = input_DetachSout( p_input );
         vlc_thread_join( p_input );
+        p_instance->p_sout = input_DetachSout( p_input );
         vlc_object_release( p_input );
         if( !p_instance->b_sout_keep && p_instance->p_sout )
         {




More information about the vlc-devel mailing list