Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2 RESEND] avformat/seek: fail seeking immediately
Date: Wed, 28 May 2025 20:19:40 +0800
Message-ID: <tencent_F0E7937A95D5090F0EA465407302084DF305@qq.com> (raw)
In-Reply-To: <20250528120851.1300164-2-kaarle.ritvanen@datakunkku.fi>



> On May 28, 2025, at 20:08, Kaarle Ritvanen via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> 
> when AVFMTCTX_UNSEEKABLE is set. Depending on the codec, the execution
> of this function may take several seconds. This is an optimization for

Why this depending on the codec? Could you provide a case that takes several seconds?

> the case where the stream is already known unseekable.
> 
> Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
> ---
> libavformat/seek.c | 3 +++
> 1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/seek.c b/libavformat/seek.c
> index c0d94371e6..1a7d3d6741 100644
> --- a/libavformat/seek.c
> +++ b/libavformat/seek.c
> @@ -643,6 +643,9 @@ int av_seek_frame(AVFormatContext *s, int stream_index,
> {
>     int ret;
> 
> +    if (s->ctx_flags & AVFMTCTX_UNSEEKABLE)
> +        return AVERROR(ENOSYS);
> +
>     if (ffifmt(s->iformat)->read_seek2 && !ffifmt(s->iformat)->read_seek) {
>         int64_t min_ts = INT64_MIN, max_ts = INT64_MAX;
>         if ((flags & AVSEEK_FLAG_BACKWARD))
> -- 
> 2.49.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".

_______________________________________________
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:[~2025-05-28 12:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 12:08 [FFmpeg-devel] [PATCH 1/2 RESEND] avformat/rtsp: set AVFMTCTX_UNSEEKABLE flag Kaarle Ritvanen via ffmpeg-devel
2025-05-28 12:08 ` [FFmpeg-devel] [PATCH 2/2 RESEND] avformat/seek: fail seeking immediately Kaarle Ritvanen via ffmpeg-devel
2025-05-28 12:19   ` Zhao Zhili [this message]
2025-05-28 13:26     ` Kaarle Ritvanen via ffmpeg-devel

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=tencent_F0E7937A95D5090F0EA465407302084DF305@qq.com \
    --to=quinkblack-at-foxmail.com@ffmpeg.org \
    --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