1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/tls_openssl: unset nonblock flag on correct URLContext during dtls handshake

The internal BIO functions do not in fact look at this flag, only the outer
tls_read and tls_write functions do.
This commit is contained in:
Timo Rothenpieler
2025-07-17 02:11:00 +02:00
parent 7afe1167e5
commit 95eae5dd50

View File

@ -702,8 +702,7 @@ static int dtls_handshake(URLContext *h)
int ret = 1, r0, r1;
TLSContext *p = h->priv_data;
int was_nonblock = h->flags & AVIO_FLAG_NONBLOCK;
h->flags &= ~AVIO_FLAG_NONBLOCK;
p->tls_shared.udp->flags &= ~AVIO_FLAG_NONBLOCK;
r0 = SSL_do_handshake(p->ssl);
if (r0 <= 0) {
@ -724,8 +723,6 @@ static int dtls_handshake(URLContext *h)
ret = 0;
p->tls_shared.state = DTLS_STATE_FINISHED;
end:
if (was_nonblock)
h->flags |= AVIO_FLAG_NONBLOCK;
return ret;
}