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 42CB04615E for ; Mon, 8 May 2023 12:00:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 450C468BA8E; Mon, 8 May 2023 15:00:30 +0300 (EEST) Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D75868B04A for ; Mon, 8 May 2023 15:00:23 +0300 (EEST) Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-192cfb46e75so1892529fac.3 for ; Mon, 08 May 2023 05:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683547221; x=1686139221; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=yUGk+UmftQnl7HT1/PtKbbEteCtT0kcVCQlulj/ZSOg=; b=hD7OFHULeQoVbN/9uYsZsbX6a14DhTshrAcrckfGjaCdAP9IzalcyDiHxqXoE0mhYA +5zmlpdxxR6MwlJaBzqB7J4ijoCGkWwNhTuJx6HvXlyTXDf71y1XZz4rLYmEmvRRxmgZ +VgbmcCFVrsPfuuIX+OcfMbUzHM1TydzX31wf94lkRTzGN8N2tKkxGbnU/96dbtVSlO2 KvGCgrDvToN3Rwo86RWc8jr7SqkfD0+Fe9aDVaXrdD7oWu2aLJzPrOAJRrQjdT5SGaid QBPnqh2hepNRsdWr4le5e8xVvbLa+g7wBpeYsxhWrIgBQDFyhY/VeRQEsS+/JAADTihn 11og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683547221; x=1686139221; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yUGk+UmftQnl7HT1/PtKbbEteCtT0kcVCQlulj/ZSOg=; b=GRGA/ieaVzAG3KBrKvMrGTXbKWZt35/vqS4o08RB4qLDXloq3kR6V1VH3VP0RkFGCn SaaK0c3r2bSXV2iR5B1M3kSUHDX0F00tL95WeG054QmHWog4zgzDKTKu4Ah6G8s9yi4r h+Gl4LU5rxyEYmTOHay+hyc58l9fvFpW7m7PQ7VufLNCWoCRxO6+mh9QM+mMf1XgRZ16 EtEGLPbENRRlXYsUvCOwU/Kk/scvCkfkaMzLZyGXwIre3omd8/lqzOb65BvB+M2x64R+ ZPM2FOfluKkRRhg5Cin+1XSDAjOpE89rs5K0plYjLvAa/bsjCebrQ6uivTqq9SrH+MSX RYaQ== X-Gm-Message-State: AC+VfDypklB+7LIEnLF/FvihMNaLLzL19BmjglSzPUMHYHqte717X7+J RICcWdqxuh90ZxQayECwEl1DKYlWRD0= X-Google-Smtp-Source: ACHHUZ55YXp17ush+OeW60S1juAdZv52UiWGF2X/APDFCIxzo7DahdRdr1TkcncOOaMiHaFIC+4e8A== X-Received: by 2002:a05:6870:4294:b0:186:d9e3:e268 with SMTP id y20-20020a056870429400b00186d9e3e268mr4492837oah.42.1683547221303; Mon, 08 May 2023 05:00:21 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id i4-20020a056870044400b00195f0e75438sm1938195oak.15.2023.05.08.05.00.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 May 2023 05:00:20 -0700 (PDT) Message-ID: Date: Mon, 8 May 2023 09:00:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 To: ffmpeg-devel@ffmpeg.org References: <20230506132503.9524-1-michael@niedermayer.cc> Content-Language: en-US From: James Almer In-Reply-To: <20230506132503.9524-1-michael@niedermayer.cc> Subject: Re: [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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 5/6/2023 10:25 AM, Michael Niedermayer wrote: > 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; > } Failing because it didn't match an extensions sort of goes against the point of probing, which even has a low score return value that's basically "it matched extension" as a sort of last resort. I'd say wrap this in a FF_COMPLIANCE_STRICT check (since i assume the spec does state mpd must be the extension), but i think we have no access to the AVFormatContext here? _______________________________________________ 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".