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 2D94946387 for ; Mon, 15 May 2023 19:45:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1D51868BF7A; Mon, 15 May 2023 22:45:05 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D6E9368BF32 for ; Mon, 15 May 2023 22:44:58 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id ADBD5FF80A for ; Mon, 15 May 2023 19:44:57 +0000 (UTC) Date: Mon, 15 May 2023 21:44:54 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230515194454.GR1391451@pb2> References: <20230515000547.1703-1-michael@niedermayer.cc> <20230515000547.1703-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: 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: multipart/mixed; boundary="===============0947283197880549012==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0947283197880549012== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="m9CJymqw5zZ14Dg6" Content-Disposition: inline --m9CJymqw5zZ14Dg6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 15, 2023 at 11:58:16AM +0200, Kacper Michajlow wrote: > 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 6b1f68ccb04d791f0250e05687c346a99ff= 47ea1 > > > > 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 =3D 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") >=20 > 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. ok >=20 > > + ); > > + > > + if (!av_match_ext (p->filename, "m3u8,hls,m3u") && > > + ff_match_url_ext(p->filename, "m3u8,hls,m3u") <=3D 0 && >=20 > 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"? i was thinking of it but i left them in yesterday. Ill post a patch that would remove them. I have a few files ending in hls but none of them qualify as "in the wild" >=20 > > + !mime_ok) { > > av_log(NULL, AV_LOG_ERROR, "Not detecting m3u8/hls with no= n standard extension\n"); >=20 > This log wording is little bit off now, when there is no extension and > only mime matching. will post a patch thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire --m9CJymqw5zZ14Dg6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZGKLsgAKCRBhHseHBAsP q+Q9AJ4v6cBjxYonKFRBt7E6oHqbK9w+/QCgjuVg9yzVgpR+k1qA90mNhEYpjSw= =CFzO -----END PGP SIGNATURE----- --m9CJymqw5zZ14Dg6-- --===============0947283197880549012== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============0947283197880549012==--