[FFmpeg-cvslog] avformat/tls: clean up new whip options

Timo Rothenpieler git at videolan.org
Thu Jul 3 23:18:44 EEST 2025


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Jul  1 17:37:45 2025 +0200| [3f7e0fddee57b3d7b24490f2ec68ddecdb35e8e6] | committer: Timo Rothenpieler

avformat/tls: clean up new whip options

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f7e0fddee57b3d7b24490f2ec68ddecdb35e8e6
---

 libavformat/tls.h  | 6 +++---
 libavformat/whip.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/tls.h b/libavformat/tls.h
index 9285228657..83d6b1ab6e 100644
--- a/libavformat/tls.h
+++ b/libavformat/tls.h
@@ -84,13 +84,13 @@ typedef struct TLSShared {
     {"tls_verify", "Verify the peer certificate",         offsetof(pstruct, options_field . verify),    AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
     {"cert_file",  "Certificate file",                    offsetof(pstruct, options_field . cert_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
     {"key_file",   "Private key file",                    offsetof(pstruct, options_field . key_file),  AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
+    {"cert_pem",   "Certificate PEM string",              offsetof(pstruct, options_field . cert_buf),  AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
+    {"key_pem",    "Private key PEM string",              offsetof(pstruct, options_field . key_buf),   AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
     {"listen",     "Listen for incoming connections",     offsetof(pstruct, options_field . listen),    AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \
     {"verifyhost", "Verify against a specific hostname",  offsetof(pstruct, options_field . host),      AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
     {"http_proxy", "Set proxy to tunnel through",         offsetof(pstruct, options_field . http_proxy), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \
     {"use_external_udp", "Use external UDP from muxer or demuxer", offsetof(pstruct, options_field . use_external_udp), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 1, .flags = TLS_OPTFL }, \
-    {"mtu", "Maximum Transmission Unit", offsetof(pstruct, options_field . mtu), AV_OPT_TYPE_INT,  { .i64 = 0 }, 0, INT_MAX, .flags = TLS_OPTFL}, \
-    {"cert_buf", "The optional certificate buffer for DTLS", offsetof(pstruct, options_field . cert_buf), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL}, \
-    {"key_buf", "The optional private key buffer for DTLS", offsetof(pstruct, options_field . key_buf), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL}
+    {"mtu",        "Maximum Transmission Unit",           offsetof(pstruct, options_field . mtu),       AV_OPT_TYPE_INT,  { .i64 = 0 }, 0, INT_MAX, .flags = TLS_OPTFL }
 
 int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options);
 
diff --git a/libavformat/whip.c b/libavformat/whip.c
index 553289c381..dc5fcd155b 100644
--- a/libavformat/whip.c
+++ b/libavformat/whip.c
@@ -1291,12 +1291,12 @@ next_packet:
                 if (whip->cert_file) {
                     av_dict_set(&opts, "cert_file", whip->cert_file, 0);
                 } else
-                    av_dict_set(&opts, "cert_buf", whip->cert_buf, 0);
+                    av_dict_set(&opts, "cert_pem", whip->cert_buf, 0);
 
                 if (whip->key_file) {
                     av_dict_set(&opts, "key_file", whip->key_file, 0);
                 } else
-                    av_dict_set(&opts, "key_buf", whip->key_buf, 0);
+                    av_dict_set(&opts, "key_pem", whip->key_buf, 0);
                 av_dict_set_int(&opts, "use_external_udp", 1, 0);
                 av_dict_set_int(&opts, "listen", 1, 0);
                 /* If got the first binding response, start DTLS handshake. */



More information about the ffmpeg-cvslog mailing list