aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tls_openssl.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2025-07-17 14:06:07 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2025-07-17 14:06:07 +0200
commite6d2c67cd096f26a4e1900ae77a784dbbd3b5f0f (patch)
tree598fe3be5ce06e94bcbce7f0384c2d5b47f97e1b /libavformat/tls_openssl.c
parentabb274b154a14aaed30e4226abe98246df5c6fc6 (diff)
downloadffmpeg-e6d2c67cd096f26a4e1900ae77a784dbbd3b5f0f.tar.gz
avformat/tls_openssl: avoid unusual inline-if style
Diffstat (limited to 'libavformat/tls_openssl.c')
-rw-r--r--libavformat/tls_openssl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index 780867ab79..a6b358d8f9 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -879,8 +879,11 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary **
}
}
- /* Setup DTLS as passive, which is server role. */
- c->listen ? SSL_set_accept_state(p->ssl) : SSL_set_connect_state(p->ssl);
+ /* This seems to be neccesary despite explicitly setting client/server method above. */
+ if (c->listen)
+ SSL_set_accept_state(p->ssl);
+ else
+ SSL_set_connect_state(p->ssl);
/**
* During initialization, we only need to call SSL_do_handshake once because SSL_read consumes