]> git.sesse.net Git - vlc/commitdiff
live555 : remove timeout thread before closing rtsp session
authorSébastien Escudier <sebastien-devel@celeos.eu>
Thu, 21 Oct 2010 12:57:56 +0000 (14:57 +0200)
committerSébastien Escudier <sebastien-devel@celeos.eu>
Thu, 21 Oct 2010 13:00:34 +0000 (15:00 +0200)
modules/demux/live555.cpp

index 2d0c64fa14bbfde31ac45a9a3703194c87a237c6..6e09985ce84ad40b4c79af5cf2effb9fb7706bbb 100644 (file)
@@ -443,6 +443,13 @@ static void Close( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
+    if( p_sys->p_timeout )
+    {
+        vlc_cancel( p_sys->p_timeout->handle );
+        vlc_join( p_sys->p_timeout->handle, NULL );
+        free( p_sys->p_timeout );
+    }
+
     if( p_sys->rtsp && p_sys->ms ) p_sys->rtsp->sendTeardownCommand( *p_sys->ms, NULL );
     if( p_sys->ms ) Medium::close( p_sys->ms );
     if( p_sys->rtsp ) RTSPClient::close( p_sys->rtsp );
@@ -460,12 +467,6 @@ static void Close( vlc_object_t *p_this )
 
     if( p_sys->i_track ) free( p_sys->track );
     if( p_sys->p_out_asf ) stream_Delete( p_sys->p_out_asf );
-    if( p_sys->p_timeout )
-    {
-        vlc_cancel( p_sys->p_timeout->handle );
-        vlc_join( p_sys->p_timeout->handle, NULL );
-        free( p_sys->p_timeout );
-    }
     delete p_sys->scheduler;
     free( p_sys->p_sdp );
     free( p_sys->psz_path );