On Tue, May 31, 2016 at 9:33 PM, Hendrik Leppkes <h.lepp...@gmail.com> wrote: > > On Tue, May 31, 2016 at 2:58 PM, Xinzheng Zhang <zhangxzh...@gmail.com> wrote: > > --- > > libavformat/tcp.c | 215 > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 215 insertions(+) > > > > This whole patch looks extremely complicated and long for something > hidden behind a tiny option not saying much. > Maybe you should start by elaborating in detail what you are trying to > fix, how you are fixing it, and why you choose this approach and not > any others that may appear simpler. >
For some ugly network conditions(Eg.Mobile device in a WiFi network, but offline from internet), getaddrinfo() could block tcp_open() for a long time, neither timeout nor interrupt callback can save us. There are serveral way to fix this issue AFAIK. We can use `getaddrinfo_a` on some linux platform http://man7.org/linux/man-pages/man3/getaddrinfo_a.3.html But, it doesn't work on other platforms. Besides, we can put this task into a background thread, and detach from it when we want to cancel the task, or it is timed out. But unfortunately, there are no global thread pool or other background facility to host such detached tasks in ffmpeg _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel