[libav-api] HTTP timeouts

Perette Barella perette at barella.org
Thu Jul 28 05:54:58 CEST 2016

I’m running into timeout problems with HTTP protocol while trying to stream some media.  My existing code requests a timeout by setting a dictionary value “timeout” and passing that to avformat_open_input, a solution which works on ffmpeg’s implementation and some libav implementations (presumably older ones).

However, I received a bug that tracks down to the requested timeout not being respected, which lead me to the libav 11.7 code.  Am I correct that the dictionary method is no longer used by tcp.c, and the timeout is now indicated by a query parameter in the URL passed to tcp_open?

So, if that’s how the TCP layer does it, how do I specify the timeout for HTTP?  Adding client-side cruft to the request URL also seems insane, and testing it shows it doesn’t work anyway.  Or did timeouts for HTTP get lost when moving away from the dictionary, and are no longer possible with HTTP?


More information about the libav-api mailing list