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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new fb5dd6ec60 avformat/tls_{openssl,gnutls,mbedtls}: gate DTLS udp 
helpers on CONFIG_UDP_PROTOCOL
fb5dd6ec60 is described below

commit fb5dd6ec60f42cd19ce5e59d745e72fdb73731f8
Author:     Vann Harl <[email protected]>
AuthorDate: Fri May 22 15:09:10 2026 +0200
Commit:     Jack Lau <[email protected]>
CommitDate: Wed May 27 11:41:32 2026 +0000

    avformat/tls_{openssl,gnutls,mbedtls}: gate DTLS udp helpers on 
CONFIG_UDP_PROTOCOL
    
    ff_udp_get_last_recv_addr and ff_udp_set_remote_addr are defined in
    udp.c which only compiles under CONFIG_UDP_PROTOCOL. Building with
    --disable-everything plus a protocol whitelist that excludes UDP
    left these references unresolved at link time, even though TLS
    itself uses TCP. Wrap the DTLS UDP-remote-addr blocks accordingly
---
 libavformat/tls_gnutls.c  | 2 ++
 libavformat/tls_mbedtls.c | 2 ++
 libavformat/tls_openssl.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 8ab691b2db..6429f89f91 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -438,6 +438,7 @@ static ssize_t gnutls_url_pull(gnutls_transport_ptr_t 
transport,
     URLContext *uc = s->is_dtls ? s->udp : s->tcp;
     int ret = ffurl_read(uc, buf, len);
     if (ret >= 0) {
+#if CONFIG_UDP_PROTOCOL
         if (s->is_dtls && s->listen && !c->dest_addr_len) {
             int err_ret;
 
@@ -449,6 +450,7 @@ static ssize_t gnutls_url_pull(gnutls_transport_ptr_t 
transport,
             }
             av_log(c, AV_LOG_TRACE, "Set UDP remote addr on UDP socket, now 
'connected'\n");
         }
+#endif
         return ret;
     }
     if (ret == AVERROR_EXIT)
diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c
index 4f85c51777..ec5350a9a9 100644
--- a/libavformat/tls_mbedtls.c
+++ b/libavformat/tls_mbedtls.c
@@ -383,6 +383,7 @@ static int mbedtls_recv(void *ctx, unsigned char *buf, 
size_t len)
     URLContext *h = shr->is_dtls ? shr->udp : shr->tcp;
     int ret = ffurl_read(h, buf, len);
     if (ret >= 0) {
+#if CONFIG_UDP_PROTOCOL
         if (shr->is_dtls && shr->listen && !tls_ctx->dest_addr_len) {
             int err_ret;
 
@@ -394,6 +395,7 @@ static int mbedtls_recv(void *ctx, unsigned char *buf, 
size_t len)
             }
             av_log(tls_ctx, AV_LOG_TRACE, "Set UDP remote addr on UDP socket, 
now 'connected'\n");
         }
+#endif
         /* Skip non-DTLS packets such as STUN to avoid failures. */
         if (shr->is_dtls && !ff_is_dtls_packet(buf, ret))
             return MBEDTLS_ERR_SSL_WANT_READ;
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index eade59b5d5..f030b6a59c 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -536,6 +536,7 @@ static int url_bio_bread(BIO *b, char *buf, int len)
     TLSShared *s = &c->tls_shared;
     int ret = ffurl_read(c->tls_shared.is_dtls ? c->tls_shared.udp : 
c->tls_shared.tcp, buf, len);
     if (ret >= 0) {
+#if CONFIG_UDP_PROTOCOL
         if (s->is_dtls && s->listen && !c->dest_addr_len) {
             int err_ret;
 
@@ -547,6 +548,7 @@ static int url_bio_bread(BIO *b, char *buf, int len)
             }
             av_log(c, AV_LOG_TRACE, "Set UDP remote addr on UDP socket, now 
'connected'\n");
         }
+#endif
 
         return ret;
     }

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

Reply via email to