]> git.sesse.net Git - vlc/blobdiff - modules/access/vcd/vcd.c
* INSTALL.win32: added a small note about running vlc under the msvc debugger.
[vlc] / modules / access / vcd / vcd.c
index 32f7d9e1aef45b7f6866f30054ea8e69fd44282a..57e1cbf534f479344e134126ae312cffa30296be 100644 (file)
@@ -2,7 +2,7 @@
  * vcd.c : VCD input module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.20 2003/05/17 20:30:31 gbazin Exp $
+ * $Id: vcd.c,v 1.22 2003/05/22 12:00:57 gbazin Exp $
  *
  * Author: Johan Bilien <jobi@via.ecp.fr>
  *
@@ -103,12 +103,6 @@ static int VCDOpen( vlc_object_t *p_this )
     int                     i_chapter = 1;
     vcddev_t                *vcddev;
 
-#ifdef WIN32
-    /* On Win32 we want the VCD access plugin to be explicitly requested,
-     * we end up with lots of problems otherwise */
-    if( !p_input->psz_access || !*p_input->psz_access ) return( -1 );
-#endif
-
     /* parse the options passed in command line : */
     psz_orig = psz_parser = psz_source = strdup( p_input->psz_name );
 
@@ -297,9 +291,9 @@ static int VCDRead( input_thread_t * p_input, byte_t * p_buffer,
 
     for ( i_index = 0 ; i_index < i_blocks ; i_index++ )
     {
-        if ( ioctl_ReadSector( VLC_OBJECT(p_input), p_vcd->vcddev,
-             p_vcd->i_sector, p_buffer + i_index * VCD_DATA_SIZE,
-             VCD_DATA_START, VCD_DATA_SIZE ) < 0 )
+        if ( ioctl_ReadSectors( VLC_OBJECT(p_input), p_vcd->vcddev,
+             p_vcd->i_sector, p_buffer + i_index * VCD_DATA_SIZE, 1,
+             VCD_TYPE ) < 0 )
         {
             msg_Err( p_input, "could not read sector %d", p_vcd->i_sector );
             return -1;
@@ -351,9 +345,8 @@ static int VCDRead( input_thread_t * p_input, byte_t * p_buffer,
 
     if ( i_len % VCD_DATA_SIZE ) /* this should not happen */
     {
-        if ( ioctl_ReadSector( VLC_OBJECT(p_input), p_vcd->vcddev,
-             p_vcd->i_sector, p_last_sector, VCD_DATA_START,
-             VCD_DATA_SIZE ) < 0 )
+        if ( ioctl_ReadSectors( VLC_OBJECT(p_input), p_vcd->vcddev,
+             p_vcd->i_sector, p_last_sector, 1, VCD_TYPE ) < 0 )
         {
             msg_Err( p_input, "could not read sector %d", p_vcd->i_sector );
             return -1;
@@ -499,8 +492,8 @@ static int VCDEntryPoints( input_thread_t * p_input )
         return -1;
     }
 
-    if( ioctl_ReadSector( VLC_OBJECT(p_input), p_vcd->vcddev,
-        VCD_ENTRIES_SECTOR, p_sector, VCD_DATA_START, VCD_DATA_SIZE ) < 0 )
+    if( ioctl_ReadSectors( VLC_OBJECT(p_input), p_vcd->vcddev,
+        VCD_ENTRIES_SECTOR, p_sector, 1, VCD_TYPE ) < 0 )
     {
         msg_Err( p_input, "could not read entry points sector" );
         free( p_sector );