[vlc-commits] file: pass error from lseek()

Rémi Denis-Courmont git at videolan.org
Mon Aug 18 19:59:06 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 18 20:58:57 2014 +0300| [b07af9f473820bcd2b5e2a7849998c430a783fa8] | committer: Rémi Denis-Courmont

file: pass error from lseek()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b07af9f473820bcd2b5e2a7849998c430a783fa8
---

 modules/access/file.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/access/file.c b/modules/access/file.c
index 6a1bde1..1b5d435 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -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;
 }
 



More information about the vlc-commits mailing list