[vlc-devel] commit: rtmp: kill the thread if the active connect failed.. ( Rémi Duraffort )
    git version control 
    git at videolan.org
       
    Sat Jul  4 11:55:21 CEST 2009
    
    
  
vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Sat Jul  4 10:31:08 2009 +0200| [f86d0e6a5034e2482228a6bf86915fba72161242] | committer: Rémi Duraffort 
rtmp: kill the thread if the active connect failed..
(cherry picked from commit c0233ecab4e7a9b5302b5bcffb030f4254cf9df2)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f86d0e6a5034e2482228a6bf86915fba72161242
---
 modules/access/rtmp/access.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/access/rtmp/access.c b/modules/access/rtmp/access.c
index b32dace..53647ba 100644
--- a/modules/access/rtmp/access.c
+++ b/modules/access/rtmp/access.c
@@ -222,6 +222,10 @@ static int Open( vlc_object_t *p_this )
         if( rtmp_connect_active( p_sys->p_thread ) < 0 )
         {
             msg_Err( p_access, "connect active failed");
+            /* Kill the running thread */
+            vlc_object_kill( p_sys->p_thread );
+            block_FifoWake( p_sys->p_thread->p_fifo_input );
+            vlc_thread_join( p_sys->p_thread );
             goto error2;
         }
     }
    
    
More information about the vlc-devel
mailing list