This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit c2b0152ad3468ffe35ecd6eb63afdee30e5d15c5
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Sun Jul 26 13:48:35 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Mon Jul 27 17:05:20 2026 +0000

    avformat/libcurl: keep the seekable user override across replies
    
    It was applied once after the probe, from the wrong thread, and any
    follow-up reply re-evaluating seekability discarded it.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavformat/libcurl.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavformat/libcurl.c b/libavformat/libcurl.c
index c7d786cba4..3c6a1730fd 100644
--- a/libavformat/libcurl.c
+++ b/libavformat/libcurl.c
@@ -354,6 +354,10 @@ static size_t header_callback(char *ptr, size_t size, 
size_t nitems, void *userd
             else
                 c->request_end = c->content_size > 0 ? c->content_size - 1 : 
-1;
         }
+        /* Apply the user override on every reply so re-evaluation of a
+         * follow-up reply doesn't clobber it. */
+        if (c->seekable_opt >= 0)
+            c->seekable = c->seekable_opt;
     } else {
         c->stream_ok = 0;
         if (!c->error)
@@ -1029,11 +1033,9 @@ static int libcurl_open(URLContext *h, const char *url, 
int flags,
     if (ret < 0)
         goto fail;
 
-    if (c->seekable_opt == 0)
-        c->seekable = 0;
-    else if (c->seekable_opt == 1)
-        c->seekable = 1;
+    pthread_mutex_lock(&c->mutex);
     h->is_streamed = !c->seekable;
+    pthread_mutex_unlock(&c->mutex);
 
     return 0;
 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to