From c74181a04b5f4e650eae662231e56518daef64d4 Mon Sep 17 00:00:00 2001 From: Jack Lau Date: Mon, 8 Sep 2025 16:31:10 +0800 Subject: [PATCH] avformat/tls_gnutls: add av_assert0() for tls_shared Signed-off-by: Jack Lau --- libavformat/tls_gnutls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c index 272603f1dd..53306872a0 100644 --- a/libavformat/tls_gnutls.c +++ b/libavformat/tls_gnutls.c @@ -30,6 +30,7 @@ #include "os_support.h" #include "url.h" #include "tls.h" +#include "libavutil/avassert.h" #include "libavutil/opt.h" #include "libavutil/thread.h" @@ -156,6 +157,7 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op TLSShared *s = &c->tls_shared; uint16_t gnutls_flags = 0; int ret; + av_assert0(s); ff_gnutls_init(); @@ -261,6 +263,7 @@ static int dtls_open(URLContext *h, const char *uri, int flags, AVDictionary **o { TLSContext *c = h->priv_data; TLSShared *s = &c->tls_shared; + av_assert0(s); s->is_dtls = 1; return tls_open(h, uri, flags, options); }