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 2D1B34611C for ; Sat, 6 May 2023 13:25:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D8B6168C089; Sat, 6 May 2023 16:25:10 +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 DAC7D68C022 for ; Sat, 6 May 2023 16:25:04 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 0F072FF809 for ; Sat, 6 May 2023 13:25:03 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 6 May 2023 15:25:01 +0200 Message-Id: <20230506132503.9524-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 1/3] avformat/dashdec: fail on probing non mpd file extension 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 MIME-Version: 1.0 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: Its unexpected that a .avi or other "standard" file turns into a playlist. The goal of this patch is to avoid this unexpected behavior and possible privacy or security differences. This is similar to the same change to hls Signed-off-by: Michael Niedermayer --- libavformat/dashdec.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 29d4680c68..294e14150d 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -2336,10 +2336,13 @@ static int dash_probe(const AVProbeData *p) av_stristr(p->buf, "dash:profile:isoff-live:2011") || av_stristr(p->buf, "dash:profile:isoff-live:2012") || av_stristr(p->buf, "dash:profile:isoff-main:2011") || - av_stristr(p->buf, "3GPP:PSS:profile:DASH1")) { - return AVPROBE_SCORE_MAX; - } - if (av_stristr(p->buf, "dash:profile")) { + av_stristr(p->buf, "3GPP:PSS:profile:DASH1") || + av_stristr(p->buf, "dash:profile")) { + if (!av_match_ext(p->filename, "mpd")) { + av_log(NULL, AV_LOG_ERROR, "Not detecting dash with non standard extension\n"); + return 0; + } + return AVPROBE_SCORE_MAX; } -- 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".