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

Git pushed a commit to branch master
in repository ffmpeg.

commit 685ebf98ef0f61f7278557dffc04dad295ffa04d
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Sep 3 22:09:03 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Sep 29 21:36:00 2026 +0200

    avformat/libcurl: report accurate error on CURLm failure
    
    In particular, this is interesting for ENOMEM.
    
    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <[email protected]>
---
 libavformat/libcurl.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/libavformat/libcurl.c b/libavformat/libcurl.c
index ffe9205c51..1ed2d85b0b 100644
--- a/libavformat/libcurl.c
+++ b/libavformat/libcurl.c
@@ -201,6 +201,16 @@ static int curlcode_to_averror(CURLcode code)
     }
 }
 
+static int curlmcode_to_averror(CURLMcode code)
+{
+    switch (code) {
+    case CURLM_OK:                       return 0;
+    case CURLM_UNKNOWN_OPTION:           return AVERROR(EINVAL);
+    case CURLM_OUT_OF_MEMORY:            return AVERROR(ENOMEM);
+    default:                             return AVERROR(EIO);
+    }
+}
+
 static int curlmcode_to_curlcode(CURLMcode code)
 {
     switch (code) {
@@ -647,7 +657,7 @@ static void start_request(CurlContext *c)
                curl_multi_strerror(res));
         c->active = 0;
         pthread_mutex_lock(&c->mutex);
-        update_status_locked(c, AVERROR(EIO), curlmcode_to_curlcode(res));
+        update_status_locked(c, curlmcode_to_averror(res), 
curlmcode_to_curlcode(res));
         pthread_cond_broadcast(&c->cond);
         pthread_mutex_unlock(&c->mutex);
     }

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to