file: pass error from lseek()
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Aug 2014 17:58:57 +0000 (20:58 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Aug 2014 17:58:57 +0000 (20:58 +0300)
modules/access/file.c

index 6a1bde1..1b5d435 100644 (file)
@@ -328,7 +328,8 @@ static int FileSeek (access_t *p_access, uint64_t i_pos)
     p_access->info.i_pos = i_pos;
     p_access->info.b_eof = false;
 
-    lseek (p_access->p_sys->fd, i_pos, SEEK_SET);
+    if (lseek (p_access->p_sys->fd, i_pos, SEEK_SET) == (off_t)-1)
+        return VLC_EGENERIC;
     return VLC_SUCCESS;
 }