Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -879,8 +879,11 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary ** · 878 unmodified lines | ||
| 879 | 879 | } |
| 880 | 880 | } |
| 881 | 881 | |
| 882 | − /* Setup DTLS as passive, which is server role. */ | |
| 883 | − c->listen ? SSL_set_accept_state(p->ssl) : SSL_set_connect_state(p->ssl); | |
| 882 | + /* This seems to be neccesary despite explicitly setting client/server method above. */ | |
| 883 | + if (c->listen) | |
| 884 | + SSL_set_accept_state(p->ssl); | |
| 885 | + else | |
| 886 | + SSL_set_connect_state(p->ssl); | |
| 884 | 887 | |
| 885 | 888 | /** |
| 886 | 889 | * During initialization, we only need to call SSL_do_handshake once because SSL_read consumes |