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

Git pushed a commit to branch master
in repository ffmpeg.

commit 8f9825cf4118d9a9f8d16ed01a579847fa9756d2
Author:     Jack Lau <[email protected]>
AuthorDate: Fri Jan 23 10:58:52 2026 +0800
Commit:     Gyan Doshi <[email protected]>
CommitDate: Wed Jan 28 10:47:07 2026 +0000

    avformat/tls_gnutls: add check for s->external_sock
    
    When s->external_sock is enabled, the underlying sock
    will be set after tls_open(), so it should not open a
    sock and handshake.
    
    Signed-off-by: Jack Lau <[email protected]>
---
 libavformat/tls_gnutls.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 8ac10d5a24..1c1c3c424c 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -535,8 +535,10 @@ static int tls_open(URLContext *h, const char *uri, int 
flags, AVDictionary **op
 
     ff_gnutls_init();
 
-    if ((ret = ff_tls_open_underlying(s, h, uri, options)) < 0)
-        goto fail;
+    if (!s->external_sock) {
+        if ((ret = ff_tls_open_underlying(s, h, uri, options)) < 0)
+            goto fail;
+    }
 
     if (s->is_dtls)
         gnutls_flags |= GNUTLS_DATAGRAM;
@@ -602,9 +604,11 @@ static int tls_open(URLContext *h, const char *uri, int 
flags, AVDictionary **op
             gnutls_dtls_set_mtu(c->session, s->mtu);
     }
     gnutls_set_default_priority(c->session);
-    ret = tls_handshake(h);
-    if (ret < 0)
-        goto fail;
+    if (!s->external_sock) {
+        ret = tls_handshake(h);
+        if (ret < 0)
+            goto fail;
+    }
     c->need_shutdown = 1;
     if (s->verify) {
         unsigned int status, cert_list_size;

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

Reply via email to