From 142d999fdaa167fc84ed49bba56348dd882b93de Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 15 Feb 2026 18:17:46 +0100 Subject: [PATCH] avformat/http: restore offset on http_open_cnx() failure The retry path restores this offset, but the failure path does not. This is especially important for the case of the continuation handler in http_read_stream(), which may result in subsequent loop iterations (after repeated failures to read additional data) seeking to the wrong offset. --- libavformat/http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/http.c b/libavformat/http.c index adbf352688..0ca20d06fd 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -512,6 +512,7 @@ redo: return 0; fail: + s->off = off; if (s->hd) ffurl_closep(&s->hd); if (ret < 0)