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 2E4954AE7C for ; Wed, 22 May 2024 09:11:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1285968D3DF; Wed, 22 May 2024 12:11:10 +0300 (EEST) Received: from sender-op-o19.zoho.eu (sender-op-e19.zoho.eu [136.143.169.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2F46A68D2EB for ; Wed, 22 May 2024 12:11:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; t=1716369061; cv=none; d=zohomail.eu; s=zohoarc; b=Rr+L2wK7kPfJFknzYmKrl9xTZCtbivgOz99nCxX2N3thdQgDDCIVKsxoc9AczlYOIGH1+umu606/tisJYTFRnU2iFXv3ZvHP2VfXRTU3t/JGMc2r0NrC5IKwl2zhZBOqGEwo40c9FvDi7uL8NFX13qaHa7d4YGGNSpEfTvOkt6M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1716369061; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=kTbG3nemFjZjYb9ZztTy44R0La4LiMAg2059BIZlZGc=; b=bMNCr7whmoF7LhTuHiIXmFgScHMM555Wuts0YWYNQOi2pXlav4v3fPjiSHlsL2h7p58zTRUecYZgH0VvIqyKevem/xtIX9Y1jO3XGSmYFSt2GdRhd8aCPcJD7b9rQnpMTfhjtLuDRFwYXGDIpYV/DwRW57sz/JTZi+LKIiUMJOE= 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=1716369061; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=kTbG3nemFjZjYb9ZztTy44R0La4LiMAg2059BIZlZGc=; b=eKp8uZf+aYErYFAPSQ6Dk/FHcFHLyYeStTHUHgsIxhEF/RFMOL53M6lRtRRE5q/f 7DdYvcmg+fn0mqQngeKVOcOSi+CNaNOJyLlY3I5fhfDdmivOHaJYJ5BXqRESq0u9Kxz 3s6a4xNxOsjG9KstazIr1O1E8a6ghmSWmtH9LpGk= Received: by mx.zoho.eu with SMTPS id 1716369059557649.3337885163364; Wed, 22 May 2024 11:10:59 +0200 (CEST) Message-ID: Date: Wed, 22 May 2024 10:10:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: ffmpeg-devel@ffmpeg.org References: <20240520201420.92545-1-post@frankplowman.com> From: Frank Plowman In-Reply-To: X-ZohoMailClient: External Subject: Re: [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 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: Thanks for your review Andreas. On 20/05/2024 21:41, Andreas Rheinhardt wrote: > Frank Plowman: >> 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; >> } > > The loop over pls->ctx indicates that pls->ctx->nb_streams can be > 1 > before avformat_find_stream_info(). But then using a single AVDictionary > is wrong, as avformat_find_stream_info() expects an array of > pls->ctx->nb_streams AVDictionary*. Thanks, v2 sent which addresses this. > > Furthermore, the mixing between AVFormatContext and AVCodecContext > options here does not seem good (e.g. for ordinary demuxers setting > strict_std_compliance does not affect the AVCodecContext's values at all). Can you see an alternative? In the case of fftools, the -strict flag is always set for both the codec_opts and format_opts but yes I see the concern assuming this logic in libav*. -- Frank _______________________________________________ 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".