diff mbox series

[FFmpeg-devel] avformat/hls: disable persistent HTTP connections by default w/ schannel

Message ID 20200426194347.6134-1-jeebjp@gmail.com
State New
Headers show
Series [FFmpeg-devel] avformat/hls: disable persistent HTTP connections by default w/ schannel | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jan Ekström April 26, 2020, 7:43 p.m. UTC
This TLS implementation has always had issues with the way that
libavformat implemented persistency, yet nobody seemed to be able to
figure out why. It currently can lead to completely stuck playback,
so disable it by default.

Additionally, update the documentation to match the new behavior.
---
 doc/demuxers.texi | 3 ++-
 libavformat/hls.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Josh Dekker April 29, 2020, 11:25 a.m. UTC | #1
On 26/04/2020 20:43, Jan Ekström wrote:
> This TLS implementation has always had issues with the way that
> libavformat implemented persistency, yet nobody seemed to be able to
> figure out why. It currently can lead to completely stuck playback,
> so disable it by default.
> 
> Additionally, update the documentation to match the new behavior.
> ---
>   doc/demuxers.texi | 3 ++-
>   libavformat/hls.c | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/demuxers.texi b/doc/demuxers.texi
> index 3c15ab9eee..35920af32d 100644
> --- a/doc/demuxers.texi
> +++ b/doc/demuxers.texi
> @@ -337,7 +337,8 @@ Default value is 1000.
>   
>   @item http_persistent
>   Use persistent HTTP connections. Applicable only for HTTP streams.
> -Enabled by default.
> +Enabled by default, except when the Windows schannel TLS implementation
> +is utilized.
>   
>   @item http_multiple
>   Use multiple HTTP connections for downloading HTTP segments.
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index fc45719d1c..f709f0c890 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -2343,7 +2343,7 @@ static const AVOption hls_options[] = {
>       {"m3u8_hold_counters", "The maximum number of times to load m3u8 when it refreshes without new segments",
>           OFFSET(m3u8_hold_counters), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, FLAGS},
>       {"http_persistent", "Use persistent HTTP connections",
> -        OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
> +        OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = !CONFIG_SCHANNEL}, 0, 1, FLAGS },
>       {"http_multiple", "Use multiple HTTP connections for fetching segments",
>           OFFSET(http_multiple), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, FLAGS},
>       {"http_seekable", "Use HTTP partial requests, 0 = disable, 1 = enable, -1 = auto",
> 

Whilst I'm not against a stop-gap change for this, did you already open 
a ticket for this? I think it would be good to track it.
diff mbox series

Patch

diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index 3c15ab9eee..35920af32d 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -337,7 +337,8 @@  Default value is 1000.
 
 @item http_persistent
 Use persistent HTTP connections. Applicable only for HTTP streams.
-Enabled by default.
+Enabled by default, except when the Windows schannel TLS implementation
+is utilized.
 
 @item http_multiple
 Use multiple HTTP connections for downloading HTTP segments.
diff --git a/libavformat/hls.c b/libavformat/hls.c
index fc45719d1c..f709f0c890 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2343,7 +2343,7 @@  static const AVOption hls_options[] = {
     {"m3u8_hold_counters", "The maximum number of times to load m3u8 when it refreshes without new segments",
         OFFSET(m3u8_hold_counters), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, FLAGS},
     {"http_persistent", "Use persistent HTTP connections",
-        OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
+        OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = !CONFIG_SCHANNEL}, 0, 1, FLAGS },
     {"http_multiple", "Use multiple HTTP connections for fetching segments",
         OFFSET(http_multiple), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, FLAGS},
     {"http_seekable", "Use HTTP partial requests, 0 = disable, 1 = enable, -1 = auto",