ffserver: unify exit path in _write_index()

Signed-off-by: 's avatarReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
parent 1175bbd1
......@@ -287,10 +287,14 @@ static int ffm_write_write_index(int fd, int64_t pos)
for(i=0;i<8;i++)
buf[i] = (pos >> (56 - i * 8)) & 0xff;
if (lseek(fd, 8, SEEK_SET) < 0)
return AVERROR(EIO);
goto bail_eio;
if (write(fd, buf, 8) != 8)
return AVERROR(EIO);
goto bail_eio;
return 8;
bail_eio:
return AVERROR(EIO);
}
static void ffm_set_write_index(AVFormatContext *s, int64_t pos,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment