[FFmpeg-devel] [FFmpeg-cvslog] avformat/hls: add http_persistent option

Michael Niedermayer michael at niedermayer.cc
Tue Dec 26 03:51:22 EET 2017

On Fri, Dec 22, 2017 at 11:00:34PM +0000, Aman Gupta wrote:
> ffmpeg | branch: master | Aman Gupta <aman at tmm1.net> | Wed Oct  4 14:52:52 2017 -0700| [b7d6c0cd48dac7869b9e6803e2d47d05a4fa373b] | committer: Aman Gupta
> avformat/hls: add http_persistent option
> This teaches the HLS demuxer to use the HTTP protocols
> multiple_requests=1 option, to take advantage of "Connection:
> Keep-Alive" when downloading playlists and segments from the HLS server.
> With the new option, you can avoid TCP connection and TLS negotiation
> overhead, which is particularly beneficial when streaming via a
> high-latency internet connection.
> Similar to the http_persistent option recently implemented in hlsenc.c
> Signed-off-by: Aman Gupta <aman at tmm1.net>
> Signed-off-by: Anssi Hannula <anssi.hannula at iki.fi>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7d6c0cd48dac7869b9e6803e2d47d05a4fa373b
> ---
>  doc/demuxers.texi |  4 ++++
>  libavformat/hls.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++----
>  2 files changed, 72 insertions(+), 4 deletions(-)

This causes a crash:

cat f.m3u 

./ffmpeg_g -i f.m3u -f null -

#0  0x00007ffff0267183 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000007d13ee in av_url_split (proto=0x7fffffff8c00 "", proto_size=10, authorization=0x0, authorization_size=0, hostname=0x7fffffff8c20 "", hostname_size=1024, port_ptr=0x7fffffff8be4, path=0x0, path_size=0, url=0x0) at libavformat/utils.c:4647
#2  0x00000000006a128b in ff_http_do_new_request (h=0x21d4600, uri=0x21d0c40 "f.m3u") at libavformat/http.c:312
#3  0x000000000069384e in open_url_keepalive (s=0x21d0080, pb=0x21d0b68, url=0x21d0c40 "f.m3u") at libavformat/hls.c:615
#4  0x0000000000693ed6 in parse_playlist (c=0x21d0ac0, url=0x21d0c40 "f.m3u", pls=0x21d0c40, in=0x21d48c0) at libavformat/hls.c:723
#5  0x00000000006962a9 in read_data (opaque=0x21d0c40, buf=0x21e0e00 "", buf_size=32768) at libavformat/hls.c:1401
#6  0x000000000065510c in read_packet_wrapper (s=0x21d1c40, buf=0x21e0e00 "", size=32768) at libavformat/aviobuf.c:533
#7  0x000000000065539a in fill_buffer (s=0x21d1c40) at libavformat/aviobuf.c:583
#8  0x0000000000655753 in avio_read (s=0x21d1c40, buf=0x21d3a10 "\330.Z\360\377\177", size=2048) at libavformat/aviobuf.c:676
#9  0x0000000000686998 in av_probe_input_buffer2 (pb=0x21d1c40, fmt=0x7fffffffdbc0, filename=0x21d3050 "@J\035\002", logctx=0x0, offset=0, max_probe_size=1048576) at libavformat/format.c:314
#10 0x0000000000686b6d in av_probe_input_buffer (pb=0x21d1c40, fmt=0x7fffffffdbc0, filename=0x21d3050 "@J\035\002", logctx=0x0, offset=0, max_probe_size=0) at libavformat/format.c:368
#11 0x000000000069762f in hls_read_header (s=0x21d0080) at libavformat/hls.c:1878
#12 0x00000000007c2373 in avformat_open_input (ps=0x7fffffffdcf0, filename=0x7fffffffe6ce "f.m3u", fmt=0x0, options=0x21cfdc8) at libavformat/utils.c:600
#13 0x000000000041524f in open_input_file (o=0x7fffffffddf0, filename=0x7fffffffe6ce "f.m3u") at fftools/ffmpeg_opt.c:1070
#14 0x000000000041ef91 in open_files (l=0x21cfd78, inout=0x1200d77 "input", open_file=0x414903 <open_input_file>) at fftools/ffmpeg_opt.c:3297
#15 0x000000000041f123 in ffmpeg_parse_options (argc=6, argv=0x7fffffffe408) at fftools/ffmpeg_opt.c:3337
#16 0x000000000043d370 in main (argc=6, argv=0x7fffffffe408) at fftools/ffmpeg.c:4816


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171226/5e20b191/attachment.sig>

More information about the ffmpeg-devel mailing list