Commit 806d685427 for ffmpeg
commit 806d685427820ab4f84f0ab09ca40c60d851adf8
Author: Niklas Haas <git@haasn.dev>
Date: Fri Sep 18 11:20:56 2026 +0200
avformat/libcurl: clear aborted flag on explicit seek
Aborted is used to signal to the curl loop that the API user wants to
interrupt an ongoing request. Logically, there's no reason to preserve
this state when the API user makes a new request explicitly.
Currently, this flag is only ever set when h->interrupt_callback fires,
either during the initial open() probe (in which case, seeking is not
possible becuase the context was never succesfully created), so this
commit is non-functional on its own.
However, it's conceivable the user wants to cancel a pending request
and perform a different request instead, or simply retry the same request
at a later point in time according to their own logic, if we ever gain
more abort conditions.
Signed-off-by: Niklas Haas <git@haasn.dev>
diff --git a/libavformat/libcurl.c b/libavformat/libcurl.c
index 7f40384f2d..3e53eadb3c 100644
--- a/libavformat/libcurl.c
+++ b/libavformat/libcurl.c
@@ -816,6 +816,7 @@ static void execute_command(CurlLoop *loop, CurlCmd *cmd)
pthread_mutex_lock(&c->mutex);
av_fifo_reset2(c->fifo);
const int was_paused = c->paused;
+ c->aborted = 0;
c->paused = 0;
c->status = 0;
c->curl_status = 0;