Skip to content

Commit a0a80b6

Browse files
committed
avformat/tls_openssl: simplify the external_sock check
Signed-off-by: Jack Lau <[email protected]>
1 parent 5a57f49 commit a0a80b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libavformat/tls_openssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary **
867867

868868
init_bio_method(h);
869869

870-
if (c->tls_shared.external_sock != 1) {
870+
if (!c->tls_shared.external_sock) {
871871
if ((ret = ff_tls_open_underlying(&c->tls_shared, h, url, options)) < 0) {
872872
av_log(c, AV_LOG_ERROR, "Failed to connect %s\n", url);
873873
return ret;
@@ -891,7 +891,7 @@ static int dtls_start(URLContext *h, const char *url, int flags, AVDictionary **
891891
*
892892
* The SSL_do_handshake can't be called if DTLS hasn't prepare for udp.
893893
*/
894-
if (c->tls_shared.external_sock != 1) {
894+
if (!c->tls_shared.external_sock) {
895895
ret = dtls_handshake(h);
896896
// Fatal SSL error, for example, no available suite when peer is DTLS 1.0 while we are DTLS 1.2.
897897
if (ret < 0) {

0 commit comments

Comments
 (0)