You've already forked FFmpeg
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:
@ -702,8 +702,7 @@ static int dtls_handshake(URLContext *h)
|
|||||||
int ret = 1, r0, r1;
|
int ret = 1, r0, r1;
|
||||||
TLSContext *p = h->priv_data;
|
TLSContext *p = h->priv_data;
|
||||||
|
|
||||||
int was_nonblock = h->flags & AVIO_FLAG_NONBLOCK;
|
p->tls_shared.udp->flags &= ~AVIO_FLAG_NONBLOCK;
|
||||||
h->flags &= ~AVIO_FLAG_NONBLOCK;
|
|
||||||
|
|
||||||
r0 = SSL_do_handshake(p->ssl);
|
r0 = SSL_do_handshake(p->ssl);
|
||||||
if (r0 <= 0) {
|
if (r0 <= 0) {
|
||||||
@ -724,8 +723,6 @@ static int dtls_handshake(URLContext *h)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
p->tls_shared.state = DTLS_STATE_FINISHED;
|
p->tls_shared.state = DTLS_STATE_FINISHED;
|
||||||
end:
|
end:
|
||||||
if (was_nonblock)
|
|
||||||
h->flags |= AVIO_FLAG_NONBLOCK;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user