[vlc-devel] commit: Do not poll regular files (useless), block devices (undefined). ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Feb 5 17:40:43 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Feb 5 18:18:19 2009 +0200| [558ed80209b28f887c58a3f9451e3c9e7b4e0628] | committer: Rémi Denis-Courmont
Do not poll regular files (useless), block devices (undefined).
We do poll character devices, as it works for TTYs and some platform
specific devices.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=558ed80209b28f887c58a3f9451e3c9e7b4e0628
---
modules/access/file.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/access/file.c b/modules/access/file.c
index 80269cc..dd5705e 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -210,10 +210,11 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
ssize_t i_ret;
#ifndef WIN32
- i_ret = net_Read (p_access, fd, NULL, p_buffer, i_len, false);
-#else
- i_ret = read (fd, p_buffer, i_len);
+ if (!p_sys->b_seekable)
+ i_ret = net_Read (p_access, fd, NULL, p_buffer, i_len, false);
+ else
#endif
+ i_ret = read (fd, p_buffer, i_len);
if( i_ret < 0 )
{
More information about the vlc-devel
mailing list