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 801D1499E4 for ; Wed, 22 May 2024 09:05:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7897A68D3E9; Wed, 22 May 2024 12:05:36 +0300 (EEST) 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 9B3DE68D2EB for ; Wed, 22 May 2024 12:05:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; t=1716368727; cv=none; d=zohomail.eu; s=zohoarc; b=ipCNTQIxceTlvuwyhx7loMKgWPYfKNp3GGUOLB6PJPVxmPQmKTpiOZLTZECA1n0FxbnCF7sU410wkTj7y2dAOEzICzl3n5PbPUXqhd0neuT8A0OS5OGRWnzbO6BJwzCUtt7VPEkbVyTyXi2iwlFfaM5md61HcMGQUxcSKHboeDc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1716368727; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=NxiNnJZatgmJ6Brhr2vySu8VSe62zgUHIQUdUM9zVSg=; b=HzqYEQJBhJjMbO2slOyK3bIKQ3pwhCo3L1C8af7ny+7ASVgc++GCTrbEFh0f4tIrFvZIpt+VLjQsCykywfpivdMJul/nclHB/um2H5M2UBjMs5JqOuu9dRxE1IdCdekqvXUIa/qA74bFWW2cTERNwDuRLgbK636Zi/B1TJvBtlM= 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=1716368727; 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=NxiNnJZatgmJ6Brhr2vySu8VSe62zgUHIQUdUM9zVSg=; b=MRnwfbygmZ/swhSBdXBKZxjtCrK0UyT2zltE6p2M4e0Q1CeX1AdRohO6cWlUPUD8 UV8iDX7HdQQw+uEkxi6tgtHbSrO289+EVzfokH+/f3lRY46Nx+O3znAWI5GydGpWM/D ygYw/P9KoViAIhoeVOT3tde50rq4BVzVYN0VJe38= Received: by mx.zoho.eu with SMTPS id 1716368724919340.98435776581823; Wed, 22 May 2024 11:05:24 +0200 (CEST) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Wed, 22 May 2024 10:02:53 +0100 Message-ID: <20240522090513.55806-1-post@frankplowman.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH v2] 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 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: 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 --- Changes since v1: Use nb_streams stream_info_opts, not just one. libavformat/dashdec.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 555e21bf69..9c5ef5801a 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1911,13 +1911,28 @@ static int reopen_demux_for_component(AVFormatContext *s, struct representation if (ret < 0) goto fail; if (pls->n_fragments) { + AVDictionary **stream_info_opts; + + stream_info_opts = av_calloc(pls->ctx->nb_streams, sizeof(*stream_info_opts)); + if (!stream_info_opts) + goto fail; + #if FF_API_R_FRAME_RATE if (pls->framerate.den) { - for (i = 0; i < pls->ctx->nb_streams; i++) + for (i = 0; i < pls->ctx->nb_streams; i++) { pls->ctx->streams[i]->r_frame_rate = pls->framerate; + av_dict_set_int(&stream_info_opts[i], "strict", s->strict_std_compliance, 0); + } + } #endif - ret = avformat_find_stream_info(pls->ctx, NULL); + + ret = avformat_find_stream_info(pls->ctx, stream_info_opts); + + for (i = 0; i < pls->ctx->nb_streams; i++) + av_dict_free(&stream_info_opts[i]); + av_dict_free(stream_info_opts); + if (ret < 0) goto fail; } -- 2.44.0 _______________________________________________ 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".