1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

ffserver: unify exit path in _write_index()

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
This commit is contained in:
Reynaldo H. Verdejo Pinochet
2015-10-04 14:08:57 -07:00
parent 1175bbd14f
commit 3388bcced4

View File

@@ -287,10 +287,14 @@ static int ffm_write_write_index(int fd, int64_t pos)
for(i=0;i<8;i++) for(i=0;i<8;i++)
buf[i] = (pos >> (56 - i * 8)) & 0xff; buf[i] = (pos >> (56 - i * 8)) & 0xff;
if (lseek(fd, 8, SEEK_SET) < 0) if (lseek(fd, 8, SEEK_SET) < 0)
return AVERROR(EIO); goto bail_eio;
if (write(fd, buf, 8) != 8) if (write(fd, buf, 8) != 8)
return AVERROR(EIO); goto bail_eio;
return 8; return 8;
bail_eio:
return AVERROR(EIO);
} }
static void ffm_set_write_index(AVFormatContext *s, int64_t pos, static void ffm_set_write_index(AVFormatContext *s, int64_t pos,