Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] flvdec: Honor the "flv_metadata" option for the "datastream" metadata field
Date: Mon, 19 Feb 2024 13:30:46 +0200 (EET)
Message-ID: <f41444b1-78b3-5e2-ee11-8a681266029@martin.st> (raw)
In-Reply-To: <20240209110443.60688-1-martin@martin.st>

On Fri, 9 Feb 2024, Martin Storsjö 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 = 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".

      reply	other threads:[~2024-02-19 11:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 11:04 Martin Storsjö
2024-02-19 11:30 ` Martin Storsjö [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f41444b1-78b3-5e2-ee11-8a681266029@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git