]> git.sesse.net Git - vlc/commitdiff
file: rewind before read
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 16 Jan 2010 16:56:40 +0000 (18:56 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 16 Jan 2010 16:56:40 +0000 (18:56 +0200)
modules/access/file.c

index 7b34f3ef36899b3351eb04c6ad873f281a802c40..64b221e29e56d4b6636bd4d04fe380c96e2d2747 100644 (file)
@@ -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)
         {