[vlc-commits] gvfs: fix initial file size check

Rémi Denis-Courmont git at videolan.org
Wed Oct 21 18:58:49 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 31 18:34:01 2015 +0300| [f4aa31f77a67cfd159ed38e8116fb3e3c7e0ab38] | committer: Jean-Baptiste Kempf

gvfs: fix initial file size check

(cherry picked from commit 68dcab3d6ebf923e69b298d988703e500b9fc04c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f4aa31f77a67cfd159ed38e8116fb3e3c7e0ab38
---

 modules/access/gnomevfs.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/access/gnomevfs.c b/modules/access/gnomevfs.c
index 9a07e46..e4d7f1a 100644
--- a/modules/access/gnomevfs.c
+++ b/modules/access/gnomevfs.c
@@ -225,10 +225,11 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    if( p_sys->b_seekable && !p_sys->p_file_info->size )
+    if( p_sys->b_seekable
+    && !(p_sys->p_file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) )
     {
         /* FIXME that's bad because all others access will be probed */
-        msg_Warn( p_access, "file %s is empty, aborting", psz_name );
+        msg_Warn( p_access, "file %s size is unknown, aborting", psz_name );
         gnome_vfs_file_info_unref( p_sys->p_file_info );
         gnome_vfs_uri_unref( p_uri);
         free( p_sys );



More information about the vlc-commits mailing list