Commit 52add4b0 authored by Gildas Bazin's avatar Gildas Bazin

- Removed unecessary translations in the win32 code from block offsets to
    byte offsets. This was overflowing some variables.
- Reduced the complexity of the Win9x ASPI functions because we only need
    to handle DVD drive access.
- Win32 code now handles seeking in areas above 2.1 Go on DVDs.
parent f58cb69a
......@@ -2,7 +2,7 @@
* css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: css.c,v 1.3 2001/06/29 11:34:28 stef Exp $
* $Id: css.c,v 1.4 2001/07/07 21:10:58 gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -37,12 +37,6 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
# include <io.h>
#endif
#include <string.h>
#include "config.h"
......@@ -321,7 +315,7 @@ int CSSGetKey( dvdcss_handle dvdcss )
*/
u8 pi_buf[0x800];
dvd_key_t pi_key;
off_t i_pos;
int i_pos;
boolean_t b_encrypted;
boolean_t b_stop_scanning;
int i_blocks_read;
......@@ -338,7 +332,7 @@ int CSSGetKey( dvdcss_handle dvdcss )
b_stop_scanning = 0;
/* Position of the title on the disc */
i_pos = (off_t)dvdcss->css.i_title_pos;
i_pos = dvdcss->css.i_title_pos;
do {
i_pos = dvdcss_seek( dvdcss, i_pos );
......
......@@ -2,7 +2,7 @@
* css.h: Structures for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: css.h,v 1.2 2001/06/20 07:43:48 sam Exp $
* $Id: css.h,v 1.3 2001/07/07 21:10:58 gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -51,7 +51,7 @@ typedef struct css_s
disc_t disc;
u8 pi_disc_key[2048];
int i_title;
off_t i_title_pos;
int i_title_pos;
dvd_key_t pi_title_key;
} css_t;
......
......@@ -2,7 +2,7 @@
* ioctl.h: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ioctl.h,v 1.4 2001/06/25 11:34:08 sam Exp $
* $Id: ioctl.h,v 1.5 2001/07/07 21:10:58 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -192,10 +192,10 @@ typedef struct _SCSI_PASS_THROUGH_DIRECT
struct w32_aspidev
{
long hASPI;
long hASPI;
short i_sid;
off_t i_pos;
long (*lpSendCommand)( void* );
int i_blocks;
long (*lpSendCommand)( void* );
};
#pragma pack(1)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment