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 83B4A497A9 for ; Mon, 19 Feb 2024 11:30:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C5B568D3FC; Mon, 19 Feb 2024 13:30:54 +0200 (EET) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5950168D3D1 for ; Mon, 19 Feb 2024 13:30:48 +0200 (EET) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 41JBUlv3020723-41JBUlv4020723 for ; Mon, 19 Feb 2024 13:30:47 +0200 Received: from cone.home.martin.st (host-97-144.parnet.fi [77.234.97.144]) by mail9.parnet.fi (Postfix) with ESMTPS id 28C9CA146D for ; Mon, 19 Feb 2024 13:30:46 +0200 (EET) Date: Mon, 19 Feb 2024 13:30:46 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20240209110443.60688-1-martin@martin.st> Message-ID: References: <20240209110443.60688-1-martin@martin.st> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] flvdec: Honor the "flv_metadata" option for the "datastream" metadata field 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: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 9 Feb 2024, Martin Storsj=F6 wrote: > By default the option "flv_metadata" (internally using the field > name "trust_metadata") is set to 0, meaning that we don't allocate > streams based on information in the metadata, only based on > actual streams we encounter. However the "datastream" metadata field > still would allocate a subtitle stream. > > When muxing, the "datastream" field is added if either a data stream > or subtitle stream is present - but the same metadata field is used > to preemtively create a subtitle stream only. Thus, if the field > was added due to a data stream, not a subtitle stream, the demuxer > would create a stream which won't get any actual packets. > > If there was such an extra, empty subtitle stream, running > avformat_find_stream_info still used to terminate within reasonable > time before 3749eede66c3774799766b1f246afae8a6ffc9bb. After that > commit, it no longer would terminate until it reaches the max > analyze duration, which is 90 seconds for flv streams (see > e6a084641aada7a2e4672172f2ee26642800a361, > 24fdf7334d2bb9aab0abdbc878b8ae51eb57c86b and > f58e011a1f30332ba824c155078ca701e29aef63). > > Before that commit (which removed the deprecated AVStream.codec), the > "st->codecpar->codec_id =3D AV_CODEC_ID_TEXT", set within the demuxer, > would get propagated into st->codec->codec_id by numerous > avcodec_parameters_to_context(st->codec, st->codecpar), then further > into st->internal->avctx->codec_id by update_stream_avctx within > read_frame_internal in libavformat/utils.c (demux.c these days). > --- > libavformat/flvdec.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) Will push soon if there are no objections. // Martin _______________________________________________ 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".