access: info.b_eof is always false during probe
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 19 Jul 2016 18:39:52 +0000 (21:39 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 21 Jul 2016 16:59:24 +0000 (19:59 +0300)
30 files changed:
include/vlc_access.h
modules/access/archive/access.c
modules/access/attachment.c
modules/access/avio.c
modules/access/cdda.c
modules/access/concat.c
modules/access/dshow/dshow.cpp
modules/access/dsm/access.c
modules/access/dv.c
modules/access/dvb/access.c
modules/access/eyetv.m
modules/access/file.c
modules/access/ftp.c
modules/access/http.c
modules/access/http/access.c
modules/access/imem-access.c
modules/access/imem.c
modules/access/mms/mmstu.c
modules/access/nfs.c
modules/access/rar/access.c
modules/access/rtsp/access.c
modules/access/sdp.c
modules/access/sftp.c
modules/access/smb.c
modules/access/tcp.c
modules/access/udp.c
modules/access/v4l2/access.c
modules/access/vcd/vcd.c
modules/access/zip/zipaccess.c
src/input/access.c

index 9dd725a..fbf56f8 100644 (file)
@@ -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; \
index d8b8c85..bb1b9e8 100644 (file)
@@ -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:
index bbef666..c5ddee4 100644 (file)
@@ -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;
index b807ef5..d4f0cc6 100644 (file)
@@ -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;
index f15b627..85daf46 100644 (file)
@@ -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;
 
index fe9c14c..18e9bdd 100644 (file)
@@ -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;
index a0a2d2f..f8901bf 100644 (file)
@@ -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 */
index 329a847..7229904 100644 (file)
@@ -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;
index fb16f37..6600880 100644 (file)
@@ -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 ) );
index b4156e5..0449fad 100644 (file)
@@ -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;
 }
index 40ddbab..59b962f 100644 (file)
@@ -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)
index 1c2a46f..e91992d 100644 (file)
@@ -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;
index 5f9bbca..7a0bcb3 100644 (file)
@@ -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;
index 167c341..94bbfca 100644 (file)
@@ -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 */
index 0b43126..81cf3e5 100644 (file)
@@ -224,7 +224,6 @@ static int Open(vlc_object_t *obj)
         goto error;
     }
 
-    access->info.b_eof = false;
     access->pf_read = NULL;
     if (live)
     {
index 49b8014..00466e3 100644 (file)
@@ -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);
index e243e29..eb47af3 100644 (file)
@@ -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;
index d1d07f5..fdd8c84 100644 (file)
@@ -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;
index d74da08..2f1e52c 100644 (file)
@@ -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");
 
index 2db5434..769ec4b 100644 (file)
@@ -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,
     };
index 094a5e6..7b0f49c 100644 (file)
@@ -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;
index 05c5914..40f8184 100644 (file)
@@ -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;
index 47ddd6c..514f518 100644 (file)
@@ -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;
 
index 08859d6..d81814c 100644 (file)
@@ -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 )
index bc477ae..1319efb 100644 (file)
@@ -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 )
index a186431..9ab9c42 100644 (file)
@@ -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 );
index 3392021..828a9fd 100644 (file)
@@ -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;
index a36401f..f2e044e 100644 (file)
@@ -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]) *
index 8e345f1..2399b2d 100644 (file)
@@ -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:
index fff3d64..e5a61c9 100644 (file)
@@ -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;