[vlc-commits] access: remote accesses can loop

Thomas Guillem git at videolan.org
Wed May 20 16:10:27 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May 18 16:20:21 2015 +0200| [784ee08484f05ac8734c809e3f5b774d67392f7d] | committer: Thomas Guillem

access: remote accesses can loop

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

 modules/access/dsm/access.c         |    3 +++
 modules/access/ftp.c                |    4 +++-
 modules/access/sftp.c               |    1 +
 modules/services_discovery/upnp.cpp |    1 +
 4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index ecf597a..39dc95f 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -690,7 +690,10 @@ static int BrowserInit( access_t *p_access )
     if( p_sys->psz_share == NULL )
         p_access->pf_readdir = BrowseShare;
     else
+    {
         p_access->pf_readdir = BrowseDirectory;
+        p_access->info.b_dir_can_loop = true;
+    }
 
     return VLC_SUCCESS;
 }
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index e9837aa..096d54c 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -666,8 +666,10 @@ static int InOpen( vlc_object_t *p_this )
         b_directory = true;
 
     if( b_directory )
+    {
         p_access->pf_readdir = DirRead;
-    else
+        p_access->info.b_dir_can_loop = true;
+    } else
         ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
 
     /* Start the 'stream' */
diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 475639a..740da6b 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -296,6 +296,7 @@ static int Open( vlc_object_t* p_this )
         p_sys->file = libssh2_sftp_opendir( p_sys->sftp_session, psz_path );
 
         p_access->pf_readdir = DirRead;
+        p_access->info.b_dir_can_loop = true;
 
         if( p_sys->file )
         {
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 078636d..4f5aaf8 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -840,6 +840,7 @@ static int Open( vlc_object_t *p_this )
 
     p_access->pf_readdir = ReadDirectory;
     p_access->info.b_dir_sorted = true;
+    p_access->info.b_dir_can_loop = true;
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list