From patchwork Mon May 15 00:05:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 41607 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:ba91:b0:105:feb:71f2 with SMTP id fb17csp1222911pzb; Sun, 14 May 2023 17:06:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Obt7WH28aPHzumq7d/7mrX9i3ZyufJcrlrw1s6Nxmw3Xml5ZdQ2oi/d9AzkFfZA8JLpGd X-Received: by 2002:a17:907:360c:b0:961:800b:3f1e with SMTP id bk12-20020a170907360c00b00961800b3f1emr30439872ejc.73.1684109160368; Sun, 14 May 2023 17:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684109160; cv=none; d=google.com; s=arc-20160816; b=ietph8kviuzYITIwe/YlvhpncAF2Tasa/u5CjzEPPZEi/O+JgjEUBzaUXCYyGfCJcd QwZa6o/eD80Ow61bHGRDqsBMaw6HwU5/Q7eT4UI/7blXZh6kvyR/zqi40GOLqlSZBSRp TP/T70/rvC12ILWgGpCzP4679wQoJLY9hpvKrTMlBDwjuEzKwtkJXMRhYWzsnCe4t2eK cnXAsIj3j0d2okKvQQ6gtPVqb58dhI7RK1chn3syzkLcxq5zqOZEaRFyjXSufSNhHAEr bgM+1jhHBfWLhZa9XE0JTVbXsAFeHqkz4Qtl4R0InO7Q5+gST4PN7AKVg23dDVKYSpPE M4hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=D62/vGXus0jiCFO19gX+QXLPSU8wBpsIOsrQ3TKb4w0=; b=UZU/dULUh0Oo0AT8BmYGtLRLAiPNKIQ4T04k2Zvx8j1ehx2RLo9AHiDqjgZ84l/P38 U65Mu//kshmNErqekjQNa/ZTbCk+9v5fkRjyvINGhHSYpE7RBwPy0MF0r53Qm4nDmCv1 htSo0bF+G0VF6wLne3f1R+iMzc24y6yW52Ye6kfndZb+UdUf5K+QPLJVVuT53ez1PvEO iX9VAlCxb5r+JB/GX3HA757vTyoRYaLichHFbYNvTcgBQz9+N3LOmcHqOA72QtEUTaYq tYK+Ie2XKAHJATDi7h/B3QFDiP9QiolSotXQZgSNoPC18P9pEEolFZpogaPZL2wIBCDc oR/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d20-20020a170906371400b00959af644ac4si10928422ejc.761.2023.05.14.17.05.59; Sun, 14 May 2023 17:06:00 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E212968BFC8; Mon, 15 May 2023 03:05:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D2A368AFCE for ; Mon, 15 May 2023 03:05:49 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id A743CC0002 for ; Mon, 15 May 2023 00:05:48 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 15 May 2023 02:05:45 +0200 Message-Id: <20230515000547.1703-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avformat/hls: reduce default max reload to 3 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: yS51/ibq4Ohm The 1000 did result in the appearance of a never ending reload loop The RFC mandates that "If the client reloads a Playlist file and finds that it has not changed, then it MUST wait for a period of one-half the target duration before retrying." and if it has changed "the client MUST wait for at least the target duration before attempting to reload the Playlist file again" Trying to reload 3 times seems a better default than 1000 given these durations Issue found by: Сергей Колесников Signed-off-by: Michael Niedermayer --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 11e345b280..df2442c376 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2556,7 +2556,7 @@ static const AVOption hls_options[] = { {.str = "3gp,aac,avi,ac3,eac3,flac,mkv,m3u8,m4a,m4s,m4v,mpg,mov,mp2,mp3,mp4,mpeg,mpegts,ogg,ogv,oga,ts,vob,wav"}, INT_MIN, INT_MAX, FLAGS}, {"max_reload", "Maximum number of times a insufficient list is attempted to be reloaded", - OFFSET(max_reload), AV_OPT_TYPE_INT, {.i64 = 1000}, 0, INT_MAX, FLAGS}, + OFFSET(max_reload), AV_OPT_TYPE_INT, {.i64 = 3}, 0, INT_MAX, FLAGS}, {"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",