Commit b3d7d241 authored by Stéphane Borel's avatar Stéphane Borel

-Fixed the lock segfault bug with some compilers

-Quick kludge in ifo to avoid a bug with optims. The real fix is coming.
parent b8539d07
......@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.30 2001/04/08 07:24:47 stef Exp $
* $Id: input_ext-intf.h,v 1.31 2001/04/10 17:47:05 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -97,7 +97,7 @@ typedef struct es_descriptor_s
#define LPCM_AUDIO_ES 0x83
#define UNKNOWN_ES 0xFF
/* ES Categories */
/* ES Categories to be used by interface plugins */
#define VIDEO_ES 0x00
#define AUDIO_ES 0x01
#define SPU_ES 0x02
......
......@@ -2,7 +2,7 @@
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_css.c,v 1.22 2001/04/08 16:57:47 sam Exp $
* $Id: dvd_css.c,v 1.23 2001/04/10 17:47:05 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -275,7 +275,8 @@ int CSSInit( css_t * p_css )
return 0;
case 0:
intf_WarnMsg( 3, "css info: no way to authenticate" );
intf_ErrMsg( "css error: no way to authenticate" );
return -1;
}
#else /* HAVE_CSS */
......@@ -406,13 +407,13 @@ int CSSGetKey( css_t * p_css )
if( !b_encrypted )
{
intf_WarnMsg( 3, "css warning: this file was _NOT_ encrypted!" );
return(0);
return 0;
}
if( b_encrypted && i_registered_keys == 0 )
{
intf_ErrMsg( "css error: unable to determine keys from file" );
return(1);
return -1;
}
for( i = 0 ; i < i_registered_keys - 1 ; i++ )
......@@ -469,10 +470,12 @@ int CSSGetKey( css_t * p_css )
memcpy( p_css->pi_title_key,
p_title_key[i_highest].pi_key, KEY_SIZE );
intf_WarnMsg( 2, "css info: vts key initialized" );
return 0;
#else /* HAVE_CSS */
return 1;
intf_ErrMsg( "css error: css decryption unavailable" );
return -1;
#endif /* HAVE_CSS */
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* input_dvd.h: thread structure of the DVD plugin
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_dvd.h,v 1.16 2001/04/08 16:57:47 sam Exp $
* $Id: input_dvd.h,v 1.17 2001/04/10 17:47:05 stef Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
......@@ -64,13 +64,6 @@ typedef struct thread_dvd_data_s
} thread_dvd_data_t;
/*****************************************************************************
* Prototypes in dvd_ifo.c
*****************************************************************************/
int IfoInit ( struct ifo_s **, int );
int IfoTitleSet ( struct ifo_s * );
void IfoEnd ( struct ifo_s * );
/*****************************************************************************
* Prototypes in dvd_css.c
*****************************************************************************/
......@@ -79,3 +72,12 @@ int CSSInit ( struct css_s * );
int CSSGetKey ( struct css_s * );
int CSSDescrambleSector ( u8 * , u8 * );
/*****************************************************************************
* Prototypes in dvd_ifo.c
*****************************************************************************/
int IfoCreate ( struct thread_dvd_data_s * );
int IfoInit ( struct ifo_s * );
int IfoTitleSet ( struct ifo_s * );
void IfoEnd ( struct ifo_s * );
......@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input.c,v 1.95 2001/04/08 09:04:33 stef Exp $
* $Id: input.c,v 1.96 2001/04/10 17:47:05 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -233,6 +233,7 @@ static void RunThread( input_thread_t *p_input )
#endif
vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_input->stream.p_selected_area->i_seek != NO_SEEK )
{
if( p_input->stream.b_seekable && p_input->pf_seek != NULL )
......@@ -254,6 +255,7 @@ static void RunThread( input_thread_t *p_input )
}
p_input->stream.p_selected_area->i_seek = NO_SEEK;
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
i_error = p_input->pf_read( p_input, pp_packets );
......
......@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.45 2001/04/08 07:24:47 stef Exp $
* $Id: input_programs.c,v 1.46 2001/04/10 17:47:05 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -58,6 +58,8 @@ int input_InitStream( input_thread_t * p_input, size_t i_data_len )
p_input->stream.pp_es = NULL;
p_input->stream.pp_selected_es = NULL;
p_input->stream.pp_programs = NULL;
p_input->stream.pp_areas = NULL;
p_input->stream.p_selected_area = NULL;
if( i_data_len )
{
......
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