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

wm4 nfxjfg at googlemail.com
Thu Oct 5 17:47:20 EEST 2017


On Thu, 5 Oct 2017 16:39:25 +0200
Moritz Barsnick <barsnick at gmx.net> wrote:

> 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:

Couldn't find anything that would make ff_http_do_new_request fail if
the host changed, but maybe I didn't look close enough.

> > +        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?

I'd think so.

> 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).

That's definitely added. Not sure what happens if the server doesn't
support it.


More information about the ffmpeg-devel mailing list