ffmpeg | branch: master | Andrey Utkin <andrey.ut...@corp.bluecherry.net> | Thu Oct 23 20:55:45 2014 +0400| [08e6832a94cc1de441625f7834db739d131e23a6] | committer: 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: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08e6832a94cc1de441625f7834db739d131e23a6 --- libavformat/rtsp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 17f1424..0a88164 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; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog