diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index d6d8afd96b..3df6e3f0a1 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -872,7 +872,7 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary ** DTLS_set_link_mtu(c->ssl, s->mtu); init_bio_method(h); - if (c->tls_shared.external_sock != 1) { + if (!c->tls_shared.external_sock) { if ((ret = ff_tls_open_underlying(&c->tls_shared, h, url, options)) < 0) { av_log(c, AV_LOG_ERROR, "Failed to connect %s\n", url); return ret; @@ -896,7 +896,7 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary ** * * The SSL_do_handshake can't be called if DTLS hasn't prepare for udp. */ - if (c->tls_shared.external_sock != 1) { + if (!c->tls_shared.external_sock) { ret = dtls_handshake(h); // Fatal SSL error, for example, no available suite when peer is DTLS 1.0 while we are DTLS 1.2. if (ret < 0) {