On Fri, Feb 16, 2018 at 7:54 AM, <rpata...@akamai.com> wrote: > From: Ravindra <rpata...@akamai.com> > > Signed-off-by: Ravindra <rpata...@akamai.com> > --- > libavformat/network.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/network.c b/libavformat/network.c > index d5c82e9..542bd3e 100644 > --- a/libavformat/network.c > +++ b/libavformat/network.c > @@ -85,7 +85,9 @@ int ff_network_wait_fd_timeout(int fd, int write, int64_t > timeout, AVIOInterrupt > ret = ff_network_wait_fd(fd, write); > if (ret != AVERROR(EAGAIN)) > return ret; > - if (timeout > 0) { > + if (!timeout) { > + return AVERROR(ETIMEDOUT); > + } else if (timeout > 0) { > if (!wait_start) > wait_start = av_gettime_relative(); > else if (av_gettime_relative() - wait_start > timeout)
Isn't that what AVIO_FLAG_NONBLOCK is basically for? It avoids calling the wait functions entirely. - Hendrik _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel