vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Aug 18 
21:00:50 2014 +0300| [f0985a7a1329b5055364e85f5299911a2c90f746] | committer: 
Rémi Denis-Courmont

mtp: pass error from lseek()

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

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

diff --git a/modules/access/mtp.c b/modules/access/mtp.c
index 9cd8023..b38e16e 100644
--- a/modules/access/mtp.c
+++ b/modules/access/mtp.c
@@ -216,7 +216,8 @@ static int Seek( 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;
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to