[FFmpeg-cvslog] http: pass return code from http_open_cnx_internal() on its failure

Andrey Utkin git at videolan.org
Tue Sep 11 19:33:26 EEST 2018


ffmpeg | branch: master | Andrey Utkin <andrey.utkin at corp.bluecherry.net> | Thu Oct 23 20:55:46 2014 +0400| [5d01bd181bb77e6740462095d7be4e0733a59420] | committer: Martin Storsjö

http: pass return code from http_open_cnx_internal() on its failure

Previously, AVERROR(EIO) was returned on failure of
http_open_cnx_internal(). Now the value is passed to upper level, thus
it is possible to distinguish ECONNREFUSED, ETIMEDOUT, ENETUNREACH etc.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavformat/http.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index 80c87f786a..dfb95642c0 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -248,6 +248,8 @@ fail:
     if (s->hd)
         ffurl_close(s->hd);
     s->hd = NULL;
+    if (location_changed < 0)
+        return location_changed;
     return AVERROR(EIO);
 }
 



More information about the ffmpeg-cvslog mailing list