]> git.sesse.net Git - ffmpeg/blobdiff - ffserver.c
Merge commit '80521c1997a23e148edf89e11b939ab8646297ca'
[ffmpeg] / ffserver.c
index f98ee821bb61161debad239f4743fa9d14cba86b..c8f9cecf4446e519a04de1f14e46d2c4c13633ce 100644 (file)
@@ -333,7 +333,8 @@ static int64_t ffm_read_write_index(int fd)
 {
     uint8_t buf[8];
 
-    lseek(fd, 8, SEEK_SET);
+    if (lseek(fd, 8, SEEK_SET) < 0)
+        return AVERROR(EIO);
     if (read(fd, buf, 8) != 8)
         return AVERROR(EIO);
     return AV_RB64(buf);
@@ -346,7 +347,8 @@ static int ffm_write_write_index(int fd, int64_t pos)
 
     for(i=0;i<8;i++)
         buf[i] = (pos >> (56 - i * 8)) & 0xff;
-    lseek(fd, 8, SEEK_SET);
+    if (lseek(fd, 8, SEEK_SET) < 0)
+        return AVERROR(EIO);
     if (write(fd, buf, 8) != 8)
         return AVERROR(EIO);
     return 8;