From 289723b41af5bb904458b4bf6e7d0f1140c9e95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Wed, 17 Jun 2026 02:37:25 +0200 Subject: [PATCH] stream_curl: fix initial stream pos when offset is used This is to match lavf/http.c behaviour and allow proper seeking. --- stream/stream_curl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stream/stream_curl.c b/stream/stream_curl.c index ad22946e01..ca97f4f42e 100644 --- a/stream/stream_curl.c +++ b/stream/stream_curl.c @@ -963,6 +963,7 @@ static int curl_open(stream_t *s, const struct stream_open_args *args) s->seek = p->seekable ? curl_seek : NULL; s->get_size = curl_get_size; s->close = curl_close; + s->pos = p->request_start; return STREAM_OK; } @@ -1172,6 +1173,7 @@ int mp_curl_avio_open(struct demuxer *demuxer, AVIOContext **pb_out, } pb->seekable = s->seekable ? AVIO_SEEKABLE_NORMAL : 0; pb->av_class = &curl_avio_class; + pb->pos = oa.offset; *pb_out = pb; *cookie_out = c;