From patchwork Tue May 12 22:05:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 19657 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 A45C344ABCF for ; Wed, 13 May 2020 01:10:59 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7D49868A956; Wed, 13 May 2020 01:10:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C3627680637 for ; Wed, 13 May 2020 01:10:52 +0300 (EEST) Received: by mail-lj1-f171.google.com with SMTP id f18so15466288lja.13 for ; Tue, 12 May 2020 15:10:52 -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=DzglfVPH9Qcz2uMGmoSR0vXQEXKGc9mwRiAiRUFrpEE=; b=VDppZ30iRnxTh548tZypMEI0S6adaD/4EzPqmb0AVu5K3PpS0dbEx8C/cH8amXaVXb NKH/TbFJzngkcDsQMH2z7k9TVbFD6ExIUdFSkVZizFLGhhkFmgVOnGTn9Yg9VMahNcxk RJKR8IRpYczspCgOLKBzWrfaMrKAzYpsxGyuWoAYQDcOvtcm/xVqIx9hE9UTP5jISbC/ I1h4BsXmVHAnc4UxMGDkGbmvEd7j7Gqiyp2Y6zAZpeN8d3XGzBoyIg0B1C3VipgDw9dQ UI1JyBfdhoLXTOCunkUUYFhrvHcDQ9wqOzhNGJsmIZPGuxPxWx+kxuhPykgbsRQpu1gu 4Vvw== 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=DzglfVPH9Qcz2uMGmoSR0vXQEXKGc9mwRiAiRUFrpEE=; b=TcttJSxTUcSpjTZLHlLL+luUKIG5n6E73lfYBxA88T1AichOmTgryvSkrcdLHjsJEN psAArQCAC9ia80wd3GFjhQMDei32Rx817wZlho2zO1CmW4l5F0nceQagtGLmSCs16KzK dKNgf2e2aPc9zfVs8j+QoploqCbCSnUWNPTT7wPSspb7vJgcFqZ0VmkQM4ALpxaedjxe ClZuO5b8BM5sY8lSM+pblOZEKfHbUviysYpEAz0sdfAAoECMx18nKGnrw+Os5cB1faJq +w7a/VnzQJJqy1YZ6SFmhDygG650+AUWyebBM817F2iPCha9zUx3F9lMYvt/2HRrXtfc Cq4A== X-Gm-Message-State: AOAM533IXt+1bgBjQ+6G4onMz2+0xaHrMqeqBYq/IGnAtVDf8Tl4EZtj poUEI1uYSw5oySK9SBcuolfhmBmB X-Google-Smtp-Source: ABdhPJy/NZ5IC94753Wi6HVsCnIubQT/3efCFv5pnmH0beq8PQjtTpXxWLEBbAxhqHXa7Ow37xjiGw== X-Received: by 2002:a2e:b4c2:: with SMTP id r2mr15391720ljm.143.1589321127291; Tue, 12 May 2020 15:05:27 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id s11sm14858178lfo.86.2020.05.12.15.05.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:05:26 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 13 May 2020 01:05:23 +0300 Message-Id: <20200512220525.9911-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/2] avformat/tls_channel: fixes to make keep-alive work 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" Without these two changes, keep-alive utilizing functionality as well as other connectivity that does not close the connection would not get all the available data, and instead would be in a loop of recv waiting to be stopped by the retry wrapper (which would then promptly call read again). Quite possible that this also fixes Trac ticket #7894, but unfortunately I do not have any RTMPS streams available for testing. The improvements were tested with an HTTPS HLS stream, and the quality of life difference is significant. Jan Ekström (2): avformat/tls_schannel: always decrypt all received data avformat/tls_schannel: immediately return decrypted data if available libavformat/tls_schannel.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)