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 6F9A2460F7 for ; Fri, 5 May 2023 20:40:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 815DB68BEB0; Fri, 5 May 2023 23:40:51 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 60FCE68B649 for ; Fri, 5 May 2023 23:40:45 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 7DD5D240005 for ; Fri, 5 May 2023 20:40:44 +0000 (UTC) Date: Fri, 5 May 2023 22:40:43 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230505204043.GK1391451@pb2> References: <20230503123038.13030-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avformat/hls: fail on probing non hls/m3u8 file extensions 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="===============2476182008874530383==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2476182008874530383== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oY1uq2ONqt5kuovO" Content-Disposition: inline --oY1uq2ONqt5kuovO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 04, 2023 at 07:23:02AM +0800, Steven Liu wrote: > Michael Niedermayer =E4=BA=8E2023=E5=B9=B45=E6= =9C=883=E6=97=A5=E5=91=A8=E4=B8=89 20:30=E5=86=99=E9=81=93=EF=BC=9A > > > > Its unexpected that a .avi or other "standard" file turns into a playli= st. > > The goal of this patch is to avoid this unexpected behavior and possible > > privacy or security differences. > > > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/hls.c | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/libavformat/hls.c b/libavformat/hls.c > > index 8a96a37ff9..826135016d 100644 > > --- a/libavformat/hls.c > > +++ b/libavformat/hls.c > > @@ -2530,10 +2530,18 @@ static int hls_probe(const AVProbeData *p) > > if (strncmp(p->buf, "#EXTM3U", 7)) > > return 0; > > > > + > Empty line, removed > > if (strstr(p->buf, "#EXT-X-STREAM-INF:") || > > strstr(p->buf, "#EXT-X-TARGETDURATION:") || > > - strstr(p->buf, "#EXT-X-MEDIA-SEQUENCE:")) > > + strstr(p->buf, "#EXT-X-MEDIA-SEQUENCE:")) { > > + > > + if (!av_match_ext(p->filename, "m3u8,hls,m3u")) { > > + av_log(NULL, AV_LOG_ERROR, "Not detecting m3u8/hls with no= n standard extension\n"); > > + return 0; > > + } > > + > > return AVPROBE_SCORE_MAX; > > + } > > return 0; > > } > > > > -- > > 2.17.1 > > > > _______________________________________________ >=20 > LGTM will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle --oY1uq2ONqt5kuovO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZFVpxwAKCRBhHseHBAsP q+T+AJ9eqC48yOKI4V3S7WAfJg3ijNAx6gCffFXYd8L2vGyXu+7YtqBHyFFuIyY= =X2g3 -----END PGP SIGNATURE----- --oY1uq2ONqt5kuovO-- --===============2476182008874530383== 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". --===============2476182008874530383==--