Commit 71375156 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

access2_New really does not need to know about preparsing.

The input already does the job.
Signed-off-by: default avatarRémi Denis-Courmont <rem@videolan.org>
parent 4dded813
......@@ -34,7 +34,7 @@
*****************************************************************************/
static access_t *access2_InternalNew( vlc_object_t *p_obj, const char *psz_access,
const char *psz_demux, const char *psz_path,
access_t *p_source, vlc_bool_t b_quick )
access_t *p_source )
{
access_t *p_access = vlc_object_create( p_obj, VLC_OBJECT_ACCESS );
......@@ -55,22 +55,11 @@ static access_t *access2_InternalNew( vlc_object_t *p_obj, const char *psz_acces
}
else
{
msg_Dbg( p_obj, "creating access '%s' path='%s'",
psz_access, psz_path );
p_access->psz_path = strdup( psz_path );
if( b_quick )
{
if( strncmp( psz_path, "file://", 7 ) == 0 )
p_access->psz_access = strdup( "" );
else
p_access->psz_access = strdup( "file" );
}
else
p_access->psz_access = strdup( psz_access );
p_access->psz_demux = strdup( psz_demux );
if( !b_quick )
msg_Dbg( p_obj, "creating access '%s' path='%s'",
psz_access, psz_path );
}
p_access->pf_read = NULL;
......@@ -119,10 +108,10 @@ static access_t *access2_InternalNew( vlc_object_t *p_obj, const char *psz_acces
* access2_New:
*****************************************************************************/
access_t *__access2_New( vlc_object_t *p_obj, const char *psz_access,
const char *psz_demux, const char *psz_path, vlc_bool_t b_quick )
const char *psz_demux, const char *psz_path )
{
return access2_InternalNew( p_obj, psz_access, psz_demux,
psz_path, NULL, b_quick );
psz_path, NULL );
}
/*****************************************************************************
......@@ -131,7 +120,7 @@ access_t *__access2_New( vlc_object_t *p_obj, const char *psz_access,
access_t *access2_FilterNew( access_t *p_source, const char *psz_access_filter )
{
return access2_InternalNew( VLC_OBJECT(p_source), psz_access_filter,
NULL, NULL, p_source, VLC_FALSE );
NULL, NULL, p_source );
}
/*****************************************************************************
......
......@@ -2289,8 +2289,7 @@ static int InputSourceInit( input_thread_t *p_input,
input_ChangeState( p_input, OPENING_S );
/* Now try a real access */
in->p_access = access2_New( p_input, psz_access, psz_demux, psz_path,
p_input->b_preparsing );
in->p_access = access2_New( p_input, psz_access, psz_demux, psz_path );
/* Access failed, URL encoded ? */
if( in->p_access == NULL && strchr( psz_path, '%' ) )
......@@ -2301,8 +2300,7 @@ static int InputSourceInit( input_thread_t *p_input,
psz_access, psz_demux, psz_path );
in->p_access = access2_New( p_input,
psz_access, psz_demux, psz_path,
p_input->b_preparsing );
psz_access, psz_demux, psz_path );
}
if( in->p_access == NULL )
{
......
......@@ -422,10 +422,9 @@ static inline void input_ChangeState( input_thread_t *p_input, int state )
/* Access */
#define access2_New( a, b, c, d, e ) __access2_New(VLC_OBJECT(a), b, c, d, e )
#define access2_New( a, b, c, d ) __access2_New(VLC_OBJECT(a), b, c, d )
access_t * __access2_New( vlc_object_t *p_obj, const char *psz_access,
const char *psz_demux, const char *psz_path,
vlc_bool_t b_quick );
const char *psz_demux, const char *psz_path );
access_t * access2_FilterNew( access_t *p_source,
const char *psz_access_filter );
void access2_Delete( access_t * );
......
......@@ -206,7 +206,7 @@ stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
MRLSplit( psz_dup, &psz_access, &psz_demux, &psz_path );
/* Now try a real access */
p_access = access2_New( p_parent, psz_access, psz_demux, psz_path, 0 );
p_access = access2_New( p_parent, psz_access, psz_demux, psz_path );
if( p_access == NULL )
{
......@@ -305,7 +305,7 @@ stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t b_quick )
if( psz_name )
{
access_t *p_tmp = access2_New( p_access, p_access->psz_access,
"", psz_name, 0 );
"", psz_name );
if( !p_tmp )
{
......@@ -1711,7 +1711,7 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
msg_Dbg( s, "opening input `%s'", psz_name );
p_list_access = access2_New( s, p_access->psz_access, "", psz_name, 0 );
p_list_access = access2_New( s, p_access->psz_access, "", psz_name );
if( !p_list_access ) return 0;
......@@ -1783,7 +1783,7 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
msg_Dbg( s, "opening input `%s'", psz_name );
p_list_access = access2_New( s, p_access->psz_access, "", psz_name, 0 );
p_list_access = access2_New( s, p_access->psz_access, "", psz_name );
if( !p_list_access ) return 0;
......@@ -1840,7 +1840,7 @@ static int ASeek( stream_t *s, int64_t i_pos )
if( i != p_sys->i_list_index && i != 0 )
{
p_list_access =
access2_New( s, p_access->psz_access, "", psz_name, 0 );
access2_New( s, p_access->psz_access, "", psz_name );
}
else if( i != p_sys->i_list_index )
{
......
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