PR #23352 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23352
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23352.patch

Forgotten in fb5dd6ec60f42cd19ce5e59d745e72fdb73731f8,
effectively disabling the #if CONFIG_UDP_PROTOCOL block;
it triggered a -Wundef warning as well as an unused-variable
warning in tls_openssl.c.
Also use the TLSShared* in tls_openssl to avoid an unused
variable warning if the UDP protocol is disabled.


>From e076b602c055a86f80381848475ab16c59d861bb Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Fri, 5 Jun 2026 00:38:06 +0200
Subject: [PATCH] avformat/tls_{gnutls,mbedtls,openssl}: Add
 config_components.h

Forgotten in fb5dd6ec60f42cd19ce5e59d745e72fdb73731f8,
effectively disabling the #if CONFIG_UDP_PROTOCOL block;
it triggered a -Wundef warning as well as an unused-variable
warning in tls_openssl.c.
Also use the TLSShared* in tls_openssl to avoid an unused
variable warning if the UDP protocol is disabled.

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavformat/tls_gnutls.c  | 2 ++
 libavformat/tls_mbedtls.c | 2 ++
 libavformat/tls_openssl.c | 5 +++--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 6429f89f91..aedbc66e56 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -25,6 +25,8 @@
 #include <gnutls/dtls.h>
 #include <gnutls/x509.h>
 
+#include "config_components.h"
+
 #include "avformat.h"
 #include "network.h"
 #include "os_support.h"
diff --git a/libavformat/tls_mbedtls.c b/libavformat/tls_mbedtls.c
index ec5350a9a9..07af7db27d 100644
--- a/libavformat/tls_mbedtls.c
+++ b/libavformat/tls_mbedtls.c
@@ -32,6 +32,8 @@
 #include <psa/crypto.h>
 #endif
 
+#include "config_components.h"
+
 #include "avformat.h"
 #include "internal.h"
 #include "network.h"
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index f030b6a59c..7c1289c595 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -20,7 +20,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "libavutil/mem.h"
+#include "config_components.h"
+
 #include "network.h"
 #include "os_support.h"
 #include "libavutil/time.h"
@@ -534,7 +535,7 @@ static int url_bio_bread(BIO *b, char *buf, int len)
 {
     TLSContext *c = BIO_get_data(b);
     TLSShared *s = &c->tls_shared;
-    int ret = ffurl_read(c->tls_shared.is_dtls ? c->tls_shared.udp : 
c->tls_shared.tcp, buf, len);
+    int ret = ffurl_read(s->is_dtls ? s->udp : s->tcp, buf, len);
     if (ret >= 0) {
 #if CONFIG_UDP_PROTOCOL
         if (s->is_dtls && s->listen && !c->dest_addr_len) {
-- 
2.52.0

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

Reply via email to