summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.utkin@corp.bluecherry.net>2014-10-23 20:55:45 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-10-23 23:53:14 +0200
commit08e6832a94cc1de441625f7834db739d131e23a6 (patch)
tree139ebdad4a023a7b58ef665fe74a8c8d670e0446 /libavformat
parent7f2af3f56b3d69149b18e062664582c858631791 (diff)
avformat/rtsp: pass return code from ffurl_open() on its failure
Previously, AVERROR(EIO) was returned. Now the value is passed from lower level, thus it is possible to distinguish ECONNREFUSED, ETIMEDOUT, ENETUNREACH etc. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 17f14241be..0a88164d84 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1737,13 +1737,14 @@ redirect:
goto fail;
}
} else {
+ int ret;
/* open the tcp connection */
ff_url_join(tcpname, sizeof(tcpname), lower_rtsp_proto, NULL,
host, port,
"?timeout=%d", rt->stimeout);
- if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, NULL) < 0) {
- err = AVERROR(EIO);
+ if ((ret = ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
+ &s->interrupt_callback, NULL)) < 0) {
+ err = ret;
goto fail;
}
rt->rtsp_hd_out = rt->rtsp_hd;