[FFmpeg-devel] [PATCH 3/3] avformat/hls: add http_keepalive option

Moritz Barsnick barsnick at gmx.net
Thu Oct 5 17:39:25 EEST 2017

On Thu, Oct 05, 2017 at 13:41:07 +0200, wm4 wrote:
> I don't really see where this patch checks whether the host changes?
> The minimal requirements for reusing the connection would be using
> the same protocol and the same host.

I *believe* it just tries to reuse the connection and falls back to
re-opening on failure. On any failure - that could be a cookie issue, a
timeout, or whatever:

> +        ret = ff_http_do_new_request(uc, url);
> +        if (ret < 0) {
> +            ff_format_io_close(c->ctx, pb);
> +            ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp);
> +        }

I wonder what the patch as a whole does if the server doesn't support
this? The same as above - just fail and reconnect?

Does the hls demuxer support HTTP 1.0? This would need a "Connection:
keep-alive" header in the request (and such a response from the
server to confirm).


More information about the ffmpeg-devel mailing list