> 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.ritva...@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-requ...@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-requ...@ffmpeg.org with subject "unsubscribe".