From patchwork Mon May 20 20:11:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Plowman X-Patchwork-Id: 49067 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3a48:b0:1af:fc2d:ff5a with SMTP id zu8csp4766514pzb; Mon, 20 May 2024 13:14:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUHxFTaqoiPztqQqRbm0EiuIjHaFt189d7Dv72o68gwaCftGzArVZf5+cg5Hzl9uTFlkkZAgusIoN6ooXxCJ3iDv3U94zslFAitpA== X-Google-Smtp-Source: AGHT+IGMhiS0nreak/eA7un8iBitdFyPRgUx5/0J5hPAelpxfwnAjY0rJ4DQPSdW2Fp6vOLulOF8 X-Received: by 2002:a17:906:4443:b0:a59:c728:5420 with SMTP id a640c23a62f3a-a5a2d6786damr1919399966b.66.1716236077652; Mon, 20 May 2024 13:14:37 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a5cdb938ad6si575446566b.873.2024.05.20.13.14.37; Mon, 20 May 2024 13:14:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@frankplowman.com header.s=zmail header.b=FAgWIeS5; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 38C0168D263; Mon, 20 May 2024 23:14:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from sender-op-o11.zoho.eu (sender-op-o11.zoho.eu [136.143.169.11]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC6A368CA16 for ; Mon, 20 May 2024 23:14:27 +0300 (EEST) Delivered-To: post@frankplowman.com ARC-Seal: i=1; a=rsa-sha256; t=1716236066; cv=none; d=zohomail.eu; s=zohoarc; b=hhPg8Z8BzGr0iAWfDHstT9BHcMEjiQwroiiV0hbOJOZiJ1CsZGM7u0IDExvPZgC85Op/c7zjdZVYen6/AADvXC6GVuw5DhPK7pSmsl6TBMseWy9zqbowgkuGAyoQhAPiLPrCZ8uvPRhRmNeu9/TJWKKCwPMUlFpdTAegeg17My0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1716236066; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=+Vc/7qeZg26U8JxJ5lCo6DA6joVidB1wh1nm+K5qb7I=; b=MsMQu098y7Wlrn2ZxFvgfFljCNNMnK4itWhMbPCT0W4i5rX3Ndl/Wm5gmUJYIE9q3erFLkAkrE3DUtL0nt/tbMgo2Cj9f0gok85QmjugRWibu4TrRORPaQtyR1RXjEw3KzrM/6m/kTZbRNBDR/GM7OYfB2kzfV8IHjqT9/JJuo0= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=frankplowman.com; spf=pass smtp.mailfrom=post@frankplowman.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1716236066; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=+Vc/7qeZg26U8JxJ5lCo6DA6joVidB1wh1nm+K5qb7I=; b=FAgWIeS5+9BZSSgFyJ5tiJyh7WQv6WiPaMiZgIahyQpMH6MOSJ5wSxzmIKsamAc7 9PP6zxrzrGLghYBDEOEuXP5Af8het3LSZTSq4hU17v4K7C9SRz68luQPVk6jkBEv8tJ Wz3r+rPdC92qRvf8dX/XzzsKsDswJfrERh9+3GS8= Received: by mx.zoho.eu with SMTPS id 17162360639061003.0876664601365; Mon, 20 May 2024 22:14:23 +0200 (CEST) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Mon, 20 May 2024 21:11:57 +0100 Message-ID: <20240520201420.92545-1-post@frankplowman.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH] lavf/dash: Forward strict flag to component demuxers 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 Cc: Frank Plowman Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: gszBcBjlwQC8 Before the patch, opening a DASH file containing streams which require experimental decoders was problematic. No matter where the -strict -2 was put on the command line, the option was not passed to the demuxer for that component. This resulted in an error, prompting the user to add the -strict -2 flag, which is already present. Decoding appeared to continue correctly however. Patch removes the error message by creating an options object for the demuxer created for the component, which inherits from the parent demuxer. Signed-off-by: Frank Plowman --- PS: Can anyone think of other options which should be propagated to the component demuxers? libavformat/dashdec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 555e21bf69..40abb5ebba 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1911,13 +1911,18 @@ static int reopen_demux_for_component(AVFormatContext *s, struct representation if (ret < 0) goto fail; if (pls->n_fragments) { + AVDictionary *stream_info_opts = NULL; + #if FF_API_R_FRAME_RATE if (pls->framerate.den) { for (i = 0; i < pls->ctx->nb_streams; i++) pls->ctx->streams[i]->r_frame_rate = pls->framerate; } #endif - ret = avformat_find_stream_info(pls->ctx, NULL); + + av_dict_set_int(&stream_info_opts, "strict", s->strict_std_compliance, 0); + + ret = avformat_find_stream_info(pls->ctx, &stream_info_opts); if (ret < 0) goto fail; }