ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Thu Jul 
17 14:06:07 2025 +0200| [e6d2c67cd096f26a4e1900ae77a784dbbd3b5f0f] | committer: 
Timo Rothenpieler

avformat/tls_openssl: avoid unusual inline-if style

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

 libavformat/tls_openssl.c | 7 +++++--
 1 file 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

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to