]> git.sesse.net Git - vlc/blobdiff - modules/demux/live555.cpp
modules: use vlc_object_alive()
[vlc] / modules / demux / live555.cpp
index faf92e196b8d1940074c4adb920641617fc3dc1a..1dd3608b342c55250da947e85d54a52b05b1a0ee 100644 (file)
@@ -323,7 +323,7 @@ static int  Open ( vlc_object_t *p_this )
             int i_read = stream_Read( p_demux->s, &p_sdp[i_sdp],
                                       i_sdp_max - i_sdp - 1 );
 
-            if( p_demux->b_die || p_demux->b_error )
+            if( !vlc_object_alive (p_demux) || p_demux->b_error )
             {
                 free( p_sdp );
                 goto error;
@@ -507,7 +507,7 @@ static int Connect( demux_t *p_demux )
     i_lefttries = 3;
 createnew:
     i_lefttries--;
-    if( p_demux->b_die || p_demux->b_error )
+    if( !vlc_object_alive (p_demux) || p_demux->b_error )
     {
         free( psz_user );
         free( psz_pwd );
@@ -669,7 +669,7 @@ static int SessionsSetup( demux_t *p_demux )
         Boolean bInit;
         live_track_t *tk;
 
-        if( p_demux->b_die || p_demux->b_error )
+        if( !vlc_object_alive (p_demux) || p_demux->b_error )
         {
             delete iter;
             return VLC_EGENERIC;
@@ -1220,7 +1220,7 @@ static int Demux( demux_t *p_demux )
         msg_Err( p_demux, "no data received in 10s, aborting" );
         return 0;
     }
-    else if( !p_sys->b_multicast && p_sys->b_no_data && p_sys->i_no_data_ti > 34 )
+    else if( !p_sys->b_multicast && p_sys->i_no_data_ti > 34 )
     {
         /* EOF ? */
         msg_Warn( p_demux, "no data received in 10s, eof ?" );
@@ -1796,7 +1796,7 @@ static void TimeoutPrevention( timeout_thread_t *p_timeout )
     vlc_thread_ready( p_timeout );
 
     /* Avoid lock */
-    while( !p_timeout->b_die )
+    while( vlc_object_alive (p_timeout) )
     {
         if( p_timeout->i_remain <= 0 )
         {