From patchwork Sun Apr 26 19:43:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 19271 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 4ED2344AB1B for ; Sun, 26 Apr 2020 23:10:21 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2756B68C0D7; Sun, 26 Apr 2020 23:10:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 38E0968B675 for ; Sun, 26 Apr 2020 23:10:14 +0300 (EEST) Received: by mail-lj1-f193.google.com with SMTP id f18so15370290lja.13 for ; Sun, 26 Apr 2020 13:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3dI8xwqmMLnsQIMNfh5tkNmRCNIDP+ZTg7pncSRi3rQ=; b=aTjYg0jTK4eYViY1yJfA5F0dWGlKURBrLkVxfl/md18HzMDu3pZui/5fBwyomkPWFv kqkxIxJAevF+Pon1DtJzecspOdJGCsL+QmDgMJK2kIlCOhE5g/r+VhUiP9sGdDh8D7q1 vZLzAkbixJqrAqW64WnIpz32cedarBb1VVL5vULLKKvEWi+9RTxdHInrf/vKZopOUeMS x9zD7jddcwL+/N1smpZum8NW7WlVxkmoA001ZyERzOVnZ0HXNhodaj6h8V4ihq1U3J54 2vUmp360P+XrpU22QFfzBJB+8CeYJw6Vs+7ncI6YDcWAA08RuxJVXpRKjee4+HHMdS8u uuGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3dI8xwqmMLnsQIMNfh5tkNmRCNIDP+ZTg7pncSRi3rQ=; b=FwY4mn0edegnVbTm8FADQyf0BPAeYI4HVSPCKtGGkNTcmNqOWFqG3v9rPocbVRftay z1En3dyWu4BsV0haloOacTRPLoc1oi5fz1J0Fnec489ChwXrJJyePPvaO+DOUl98bvWQ eS2JSbRV5NLld6/rEal5DPFs2hIlWaTgspEqjVQo5wiCDxOYOYT2qTgVmMA4VIKfIbly S6fHg+VIM66uX2DpAk8lJzoncYqkhrRpEhl8W0iqs2kgG59CcCLPiWv4T3WkXl3YEhIo Ot4vQ2ZCfDAUYAGF6h/VizoT1bW6ighx1KSsixX4waUSj2mjpIcnp1LwTcZ8xSoekMAO E/PA== X-Gm-Message-State: AGi0PubtHLHlX5K8l3ioJmivv0hIwqSImoUZXNmPpkIzl3/1NZFXkxOe agfMBgV0M2dFb5LbGXiz7yCdQ+pU X-Google-Smtp-Source: APiQypLwss9V40NDvB85Xo8uEFo2GnV2FSJLzsDKKe6bkmkYIkk7pbGZJ8Jt+5Gs34fnmJXrTj7G9g== X-Received: by 2002:a05:6512:3189:: with SMTP id i9mr13126965lfe.178.1587930228991; Sun, 26 Apr 2020 12:43:48 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id x21sm8584796ljm.74.2020.04.26.12.43.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2020 12:43:48 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 26 Apr 2020 22:43:47 +0300 Message-Id: <20200426194347.6134-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/hls: disable persistent HTTP connections by default w/ schannel X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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",