Commit 08e6832a authored by Andrey Utkin's avatar Andrey Utkin Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7f2af3f5
...@@ -1737,13 +1737,14 @@ redirect: ...@@ -1737,13 +1737,14 @@ redirect:
goto fail; goto fail;
} }
} else { } else {
int ret;
/* open the tcp connection */ /* open the tcp connection */
ff_url_join(tcpname, sizeof(tcpname), lower_rtsp_proto, NULL, ff_url_join(tcpname, sizeof(tcpname), lower_rtsp_proto, NULL,
host, port, host, port,
"?timeout=%d", rt->stimeout); "?timeout=%d", rt->stimeout);
if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE, if ((ret = ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE,
&s->interrupt_callback, NULL) < 0) { &s->interrupt_callback, NULL)) < 0) {
err = AVERROR(EIO); err = ret;
goto fail; goto fail;
} }
rt->rtsp_hd_out = rt->rtsp_hd; rt->rtsp_hd_out = rt->rtsp_hd;
......
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