]> git.sesse.net Git - vlc/blobdiff - modules/access/dv.c
The last but not least of this serie of memleaks.
[vlc] / modules / access / dv.c
index 8962de4217f1d7f7735ad00691fc919b0f23e7af..911a7f8673522035da130fed4800c6d219627cf2 100644 (file)
@@ -368,7 +368,7 @@ static int Raw1394EventThread( vlc_object_t *p_this )
 
     vlc_thread_ready( p_this );
 
-    while( !p_sys->p_ev->b_die )
+    while( vlc_object_alive (p_sys->p_ev) )
     {
         while( ( result = poll( &(p_sys->raw1394_poll), 1, 200 ) ) < 0 )
         {
@@ -377,10 +377,8 @@ static int Raw1394EventThread( vlc_object_t *p_this )
                 perror( "error: raw1394 poll" );
                 msg_Err( p_access, "retrying device raw1394" );
             }
-            if( p_sys->p_ev->b_die )
-                break;
         }
-        if( p_sys->p_ev->b_die )
+        if( !vlc_object_alive (p_sys->p_ev) )
                 break;
         if( result > 0 && ( ( p_sys->raw1394_poll.revents & POLLIN )
                 || ( p_sys->raw1394_poll.revents & POLLPRI ) ) )