1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

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>
This commit is contained in:
Andrey Utkin
2014-10-23 20:55:45 +04:00
committed by Michael Niedermayer
parent 7f2af3f56b
commit 08e6832a94

View File

@@ -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;