]> git.sesse.net Git - vlc/blobdiff - modules/access/file.c
mmdevice: fix crash if several channel volumes change (fixes #12086)
[vlc] / modules / access / file.c
index 6a1bde1d8ca191e072f0ad06697c77ef8def0c12..1b5d435078a0e3f052ba1c4fe89ede54fe7619ad 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;
 }