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

access: info.b_eof is always false during probe

parent b75a89f0
......@@ -239,11 +239,6 @@ static inline int access_GetSize( access_t *p_access, uint64_t *size )
return access_Control( p_access, ACCESS_GET_SIZE, size );
}
static inline void access_InitFields( access_t *p_a )
{
p_a->info.b_eof = false;
}
/**
* \defgroup access_helper Access Helpers
* @{
......@@ -264,7 +259,6 @@ VLC_API int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va
#define STANDARD_READ_ACCESS_INIT \
do { \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM;\
......@@ -272,7 +266,6 @@ VLC_API int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va
#define STANDARD_BLOCK_ACCESS_INIT \
do { \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( NULL, Block, Control, Seek ); \
p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM; \
......
......@@ -410,8 +410,6 @@ int AccessOpen(vlc_object_t *p_object)
p_access->pf_control = Control;
p_access->pf_seek = Seek;
access_InitFields(p_access);
return VLC_SUCCESS;
error:
......
......@@ -91,7 +91,6 @@ static int Open(vlc_object_t *object)
sys->offset = 0;
/* */
access_InitFields(access);
access->pf_read = Read;
access->pf_block = NULL;
access->pf_control = Control;
......
......@@ -195,8 +195,6 @@ int OpenAvio(vlc_object_t *object)
msg_Dbg(access, "%sseekable, size=%"PRIi64, seekable ? "" : "not ", size);
/* */
access_InitFields(access);
access->pf_read = Read;
access->pf_block = NULL;
access->pf_control = Control;
......
......@@ -247,7 +247,6 @@ static int Open( vlc_object_t *p_this )
}
/* Set up p_access */
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( NULL, Block, Control, Seek );
return VLC_SUCCESS;
......
......@@ -295,7 +295,6 @@ static int Open(vlc_object_t *obj)
*pp = NULL;
sys->next = sys->first;
access_InitFields(access);
access->pf_read = read_cb ? Read : NULL;
access->pf_block = read_cb ? NULL : Block;
access->pf_seek = Seek;
......
......@@ -791,7 +791,6 @@ static int AccessOpen( vlc_object_t *p_this )
p_access->pf_block = ReadCompressed;
p_access->pf_control = AccessControl;
p_access->pf_seek = NULL;
p_access->info.b_eof = false;
p_access->p_sys = p_sys;
/* Everything is ready. Let's rock baby */
......
......@@ -128,7 +128,6 @@ static int Open( vlc_object_t *p_this )
smb_stat st;
/* Init p_access */
access_InitFields( p_access );
p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
if( p_access->p_sys == NULL )
return VLC_ENOMEM;
......
......@@ -126,7 +126,6 @@ static int Open( vlc_object_t *p_this )
msg_Dbg( p_access, "opening device" );
/* Set up p_access */
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( NULL, Block, Control, NULL );
p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
......
......@@ -194,7 +194,6 @@ static int Open( vlc_object_t *p_this )
/* Set up access */
p_access->pf_control = Control;
access_InitFields( p_access );
return VLC_SUCCESS;
}
......
......@@ -151,7 +151,6 @@ static int Open(vlc_object_t *p_this)
int publicSock;
/* Init p_access */
access_InitFields(p_access);
ACCESS_SET_CALLBACKS(NULL, BlockRead, Control, NULL);
p_sys = p_access->p_sys = calloc(1, sizeof(access_sys_t));
if (!p_sys)
......
......@@ -214,7 +214,6 @@ int FileOpen( vlc_object_t *p_this )
access_sys_t *p_sys = malloc (sizeof (*p_sys));
if (unlikely(p_sys == NULL))
goto error;
access_InitFields (p_access);
p_access->pf_read = Read;
p_access->pf_block = NULL;
p_access->pf_control = FileControl;
......
......@@ -645,7 +645,6 @@ static int InOpen( vlc_object_t *p_this )
bool b_directory = false;
/* Init p_access */
access_InitFields( p_access );
p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
......
......@@ -194,7 +194,6 @@ static int Open( vlc_object_t *p_this )
p_sys->b_has_size = false;
p_sys->offset = 0;
p_sys->size = 0;
p_access->info.b_eof = false;
p_access->p_sys = p_sys;
/* Only forward an store cookies if the corresponding option is activated */
......
......@@ -224,7 +224,6 @@ static int Open(vlc_object_t *obj)
goto error;
}
access->info.b_eof = false;
access->pf_read = NULL;
if (live)
{
......
......@@ -143,7 +143,6 @@ static int Open(vlc_object_t *object)
access->pf_control = Control;
access->p_sys = sys;
access_InitFields(access);
return VLC_SUCCESS;
error:
free(sys);
......
......@@ -304,7 +304,6 @@ static int OpenAccess(vlc_object_t *object)
}
/* */
access_InitFields(access);
access->pf_control = ControlAccess;
access->pf_read = NULL;
access->pf_block = Block;
......
......@@ -92,7 +92,6 @@ int MMSTUOpen( access_t *p_access )
int i_status;
/* Set up p_access */
access_InitFields( p_access );
p_access->pf_read = NULL;
p_access->pf_block = Block;
p_access->pf_control = Control;
......
......@@ -635,7 +635,6 @@ Open(vlc_object_t *p_obj)
if (unlikely(p_sys == NULL))
goto error;
p_access->p_sys = p_sys;
p_access->info.b_eof = false;
p_sys->b_auto_guid = var_InheritBool(p_obj, "nfs-auto-guid");
......
......@@ -219,8 +219,6 @@ int RarAccessOpen(vlc_object_t *object)
access->pf_control = Control;
access->pf_seek = Seek;
access_InitFields(access);
rar_file_chunk_t dummy = {
.mrl = base,
};
......
......@@ -162,7 +162,6 @@ static int Open( vlc_object_t *p_this )
p_access->pf_block = BlockRead;
p_access->pf_seek = Seek;
p_access->pf_control = Control;
p_access->info.b_eof = false;
p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
......
......@@ -65,7 +65,6 @@ static int Open (vlc_object_t *obj)
sys->length = len;
memcpy (sys->data, access->psz_location, len);
access_InitFields (access);
access->pf_read = Read;
access->pf_block = NULL;
access->pf_seek = Seek;
......
......@@ -147,7 +147,6 @@ static int Open( vlc_object_t* p_this )
if( !p_access->psz_location )
return VLC_EGENERIC;
access_InitFields( p_access );
p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
if( !p_sys ) return VLC_ENOMEM;
......
......@@ -225,7 +225,6 @@ static int Open( vlc_object_t *p_this )
free( psz_decoded_path );
/* Init p_access */
access_InitFields( p_access );
p_sys =
p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
if( !p_sys )
......
......@@ -95,7 +95,6 @@ static int Open( vlc_object_t *p_this )
*psz_parser++ = '\0';
/* Init p_access */
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( Read, NULL, Control, NULL );
p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) );
if( !p_sys )
......
......@@ -111,7 +111,6 @@ static int Open( vlc_object_t *p_this )
p_access->p_sys = sys;
/* Set up p_access */
access_InitFields( p_access );
ACCESS_SET_CALLBACKS( NULL, BlockUDP, Control, NULL );
char *psz_name = strdup( p_access->psz_location );
......
......@@ -62,8 +62,6 @@ int AccessOpen( vlc_object_t *obj )
if( access->b_preparsing )
return VLC_EGENERIC;
access_InitFields( access );
access_sys_t *sys = calloc (1, sizeof (*sys));
if( unlikely(sys == NULL) )
return VLC_ENOMEM;
......
......@@ -197,8 +197,6 @@ static int Open( vlc_object_t *p_this )
p_access->pf_control = Control;
p_access->pf_seek = Seek;
p_access->info.b_eof = false;
p_sys->i_current_title = i_title;
p_sys->i_current_seekpoint = i_chapter;
p_sys->offset = (uint64_t)(p_sys->i_sector - p_sys->p_sectors[1+i_title]) *
......
......@@ -179,8 +179,6 @@ int AccessOpen( vlc_object_t *p_this )
/* Set callback */
ACCESS_SET_CALLBACKS( AccessRead, NULL, AccessControl, AccessSeek );
p_access->info.b_eof = false;
i_ret = VLC_SUCCESS;
exit:
......
......@@ -81,7 +81,7 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
access->pf_control = NULL;
access->p_sys = NULL;
access->b_preparsing = preparsing;
access_InitFields(access);
access->info.b_eof = false;
if (unlikely(access->psz_url == NULL))
goto error;
......
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