]> git.sesse.net Git - vlc/blobdiff - modules/access/dv.c
\o/ skins2 work on win32 \o/ <(°v°<)
[vlc] / modules / access / dv.c
index ddd725f5fab36d94f5d3575552a460d25e8482ea..057a5ee8939e5d80585ddf8b9afa038b93709fa3 100644 (file)
@@ -70,7 +70,7 @@ static int Control( access_t *, int, va_list );
 
 #define CACHING_TEXT N_("Caching value in ms")
 #define CACHING_LONGTEXT N_( \
-    "Caching value for DV streams. This" \
+    "Caching value for DV streams. This " \
     "value should be set in milliseconds." )
 
 vlc_module_begin();
@@ -97,7 +97,7 @@ typedef struct
 
 } event_thread_t;
 
-static int Raw1394EventThread( vlc_object_t * );
+static void* Raw1394EventThread( vlc_object_t * );
 static int Raw1394Handler( raw1394handle_t, int, size_t, quadlet_t * );
 
 static int Raw1394GetNumPorts( access_t *p_access );
@@ -218,7 +218,7 @@ static int Open( vlc_object_t *p_this )
     raw1394_start_iso_rcv( p_sys->p_raw1394, p_sys->i_channel );
 
     p_sys->raw1394_poll.fd = raw1394_get_fd( p_sys->p_raw1394 );
-    p_sys->raw1394_poll.events = POLLIN | POLLERR | POLLHUP | POLLPRI;
+    p_sys->raw1394_poll.events = POLLIN | POLLPRI;
 
     /* Update default_pts to a suitable value for udp access */
     var_Create( p_access, "dv-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
@@ -357,12 +357,13 @@ static block_t *Block( access_t *p_access )
     return p_block;
 }
 
-static int Raw1394EventThread( vlc_object_t *p_this )
+static void* Raw1394EventThread( vlc_object_t *p_this )
 {
     event_thread_t *p_ev = (event_thread_t *) p_this;
     access_t *p_access = (access_t *) p_ev->p_access;
     access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
     int result = 0;
+    int canc = vlc_savecancel ();
 
     AVCPlay( p_access, p_sys->i_node );
 
@@ -377,8 +378,6 @@ 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( !vlc_object_alive (p_sys->p_ev) )
                 break;
@@ -388,7 +387,8 @@ static int Raw1394EventThread( vlc_object_t *p_this )
     }
 
     AVCStop( p_access, p_sys->i_node );
-    return VLC_SUCCESS;
+    vlc_restorecancel (canc);
+    return NULL;
 }
 
 static int Raw1394Handler( raw1394handle_t handle, int channel, size_t length, quadlet_t *data )