diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-10-04 14:08:57 -0700 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> | 2015-10-04 15:58:35 -0700 |
commit | 3388bcced450bfc8e6aff17f57184f29fd4a3383 (patch) | |
tree | 31b0db63accb49d5830056d1c54dcb10fca94182 /ffserver.c | |
parent | 1175bbd14fe36f1bbd99fd096630bcfd77767199 (diff) | |
download | ffmpeg-3388bcced450bfc8e6aff17f57184f29fd4a3383.tar.gz |
ffserver: unify exit path in _write_index()
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c index 032ce227da..e3c3b420a2 100644 --- a/ffserver.c +++ b/ffserver.c @@ -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, |