On Thu, Oct 23, 2014 at 08:55:45PM +0400, Andrey Utkin wrote: > Previously, AVERROR(EIO) was returned. Now the value is passed from > lower level, thus it is possible to distinguish ECONNREFUSED, ETIMEDOUT, > ENETUNREACH etc. > --- > libavformat/rtsp.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c > index 1682db8..f054293 100644 > --- a/libavformat/rtsp.c > +++ b/libavformat/rtsp.c > @@ -1600,6 +1600,7 @@ int ff_rtsp_connect(AVFormatContext *s) > char real_challenge[64] = ""; > struct sockaddr_storage peer; > socklen_t peer_len = sizeof(peer); > + int ret; > > if (rt->rtp_port_max < rt->rtp_port_min) { > av_log(s, AV_LOG_ERROR, "Invalid UDP port range, max port %d less " > @@ -1741,9 +1742,9 @@ redirect: > 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;
why doesnt this write into err directly without ret ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel