ffmpeg | branch: master | Reynaldo H. Verdejo Pinochet 
<reyna...@osg.samsung.com> | Sun Oct  4 14:08:57 2015 -0700| 
[3388bcced450bfc8e6aff17f57184f29fd4a3383] | committer: Reynaldo H. Verdejo 
Pinochet

ffserver: unify exit path in _write_index()

Signed-off-by: Reynaldo H. Verdejo Pinochet <reyna...@osg.samsung.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3388bcced450bfc8e6aff17f57184f29fd4a3383
---

 ffserver.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 032ce22..e3c3b42 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,

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to