[vlc-devel] [PATCH] file: disable FAST_SEEK if remote
Thomas Guillem
thomas at gllm.fr
Mon Mar 12 19:21:20 CET 2018
This enable the prefetch filter on Windows SMB shares for example.
---
modules/access/file.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/access/file.c b/modules/access/file.c
index 4a6213b73a..f65d69bbdf 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -318,10 +318,14 @@ static int FileControl( stream_t *p_access, int i_query, va_list args )
switch( i_query )
{
case STREAM_CAN_SEEK:
- case STREAM_CAN_FASTSEEK:
pb_bool = va_arg( args, bool * );
*pb_bool = (p_access->pf_seek != NoSeek);
break;
+ case STREAM_CAN_FASTSEEK:
+ pb_bool = va_arg( args, bool * );
+ *pb_bool = (p_access->pf_seek != NoSeek
+ && !IsRemote (p_sys->fd, p_access->psz_filepath));
+ break;
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
--
2.11.0
More information about the vlc-devel
mailing list