[vlc-devel] commit: file: rewind before read ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Jan 16 17:56:57 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 16 18:56:40 2010 +0200| [09049343c7bdaf39aa5840710260141962e4bdc2] | committer: Rémi Denis-Courmont
file: rewind before read
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09049343c7bdaf39aa5840710260141962e4bdc2
---
modules/access/file.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/access/file.c b/modules/access/file.c
index 7b34f3e..64b221e 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -145,7 +145,11 @@ int Open( vlc_object_t *p_this )
int oldfd = strtol (path, &end, 10);
if (*end == '\0')
+ {
fd = dup (oldfd);
+ if (fd != -1)
+ lseek (fd, 0, SEEK_SET);
+ }
#ifdef HAVE_FDOPENDIR
else if (*end == '/' && end > path)
{
More information about the vlc-devel
mailing list