From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5D7C846348 for ; Mon, 15 May 2023 09:58:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6590F68C069; Mon, 15 May 2023 12:58:31 +0300 (EEST) Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8331768BE45 for ; Mon, 15 May 2023 12:58:25 +0300 (EEST) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-1924fa9620aso5142168fac.0 for ; Mon, 15 May 2023 02:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684144703; x=1686736703; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=KcKrdYq/7uGjJwhZXcoHKOkx14uVvK/7KftmiCncNJA=; b=Iqy3GS1M0/be04KlSXTu5QWD6d/Enz6CQfo3a275x6/DWBtRXD2sGk/38UwHX/vRou HuUgUUguCleHnIcseG9kn2lFPagLMowVVhu+Vqd4PAcXqw+cgguGGdF1di74PiVzqWDH 7GedMQTz3QVXZBn6oTcCDssrp16kkiiWYQRZpzpiIzjdtK15xmo05EYg3K9h+2sWErHc qlHlBOHs8J+snxkUupsAp01UpHo5/AT1LyyN4xoK9xjrZdvNsc+pGVd1QuB+9Rd7f0Sv Etgf4O74Q1/ABKty/2UTGpWHKjdzGnu4a4EV0UMJAP55ZfJPkhljkJ3QUwXo/bXkHNNL zgoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684144703; x=1686736703; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KcKrdYq/7uGjJwhZXcoHKOkx14uVvK/7KftmiCncNJA=; b=NDTg4Xv1RIAUjPkXf+c+23MflPMm3nNV80UZRj+vuZi+1ph0fyTD6Li+TAuy2MztL2 bcGCY4tlm7bkR8Wv9RvT1qh2W9uxlVAwTSK3F/mWDlx7j8pBYJnA+uHC+c2vb8G77j88 logB4nr25r+bRROJgBBCUxhkW/mRDqk/0KSsuNomt+Nm3xzr0FDWHLvM8k2LkMuRphQi bSzmsZjijmOALJF9pfcVhGYXWM2drcagpAXsZEJwFXYeIgoyCRVId0U0hhU3M6cvCGuK LWKJODmbkjsKodz9DGPJlYAJWH/A+rjDULQ2cc8C2mUc8pzVddq87qw3S2wFRM5yZ6aH ON+w== X-Gm-Message-State: AC+VfDw26c/qrUNGIUWoQeCoBwvUoERlGU6MwjsFsxPgGvKkGpL3arrD lGN4ANyj12SJqyk41sEOVHl9TxKnt5I3cNLzJWI/3grUTJo= X-Google-Smtp-Source: ACHHUZ42nKfBg6mTgzhertJukzPc0UPhr0bk4InShE/2+g04XSnNTnkWoiBgCLxy+dOQa9uxboA0x+i3jS4zrD2g+7w= X-Received: by 2002:a05:6870:a701:b0:199:ccb2:12f2 with SMTP id g1-20020a056870a70100b00199ccb212f2mr1118193oam.20.1684144703016; Mon, 15 May 2023 02:58:23 -0700 (PDT) MIME-Version: 1.0 References: <20230515000547.1703-1-michael@niedermayer.cc> <20230515000547.1703-3-michael@niedermayer.cc> In-Reply-To: <20230515000547.1703-3-michael@niedermayer.cc> From: Kacper Michajlow Date: Mon, 15 May 2023 11:58:16 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 3/3] avformat/hls: Try to implement RFC8216 playlist refusal 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 15 May 2023 at 02:06, Michael Niedermayer wrote: > > This is not well tested and can likely be improved, just a > hotfix for hls probe failures since 6b1f68ccb04d791f0250e05687c346a99ff47ea1 > > Should fix Ticket10353 (please test and report cases that still fail) > > Signed-off-by: Michael Niedermayer > --- > libavformat/hls.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index df2442c376..790ae7a96a 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -2534,7 +2534,16 @@ static int hls_probe(const AVProbeData *p) > strstr(p->buf, "#EXT-X-TARGETDURATION:") || > strstr(p->buf, "#EXT-X-MEDIA-SEQUENCE:")) { > > - if (!av_match_ext(p->filename, "m3u8,hls,m3u")) { > + int mime_ok = p->mime_type && !( > + av_strcasecmp(p->mime_type, "application/vnd.apple.mpegurl") && > + av_strcasecmp(p->mime_type, "audio/mpegurl") && > + av_strcasecmp(p->mime_type, "audio/x-mpegurl") && > + av_strcasecmp(p->mime_type, "application/x-mpegurl") How about we AV_LOG_WARNING when non-standard/deprecated mime type is used? If we want to be strict about rfc8216 only two first should be supported. Of course for compatibility reasons likely we need to support all of them, but warn about it would be nice touch. > + ); > + > + if (!av_match_ext (p->filename, "m3u8,hls,m3u") && > + ff_match_url_ext(p->filename, "m3u8,hls,m3u") <= 0 && Where '.hls' came from? I don't think those are in fact used in the wild? Maybe we can be strict and use only "m3u8,m3u"? > + !mime_ok) { > av_log(NULL, AV_LOG_ERROR, "Not detecting m3u8/hls with non standard extension\n"); This log wording is little bit off now, when there is no extension and only mime matching. > return 0; > } > -- > 2.17.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Minor remarks, but funcionally the patch resolves the issue. Thanks. - Kacper _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".