avformat/tls_openssl: Don't call functions inside FFMIN
It may call the function multiple times. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
ced4a6ebc9
commit
db6cd6c6bf
1 changed files with 4 additions and 2 deletions
|
|
@ -939,8 +939,10 @@ static int tls_write(URLContext *h, const uint8_t *buf, int size)
|
|||
uc->flags &= ~AVIO_FLAG_NONBLOCK;
|
||||
uc->flags |= h->flags & AVIO_FLAG_NONBLOCK;
|
||||
|
||||
if (s->is_dtls)
|
||||
size = FFMIN(size, DTLS_get_data_mtu(c->ssl));
|
||||
if (s->is_dtls) {
|
||||
const size_t mtu_size = DTLS_get_data_mtu(c->ssl);
|
||||
size = FFMIN(size, mtu_size);
|
||||
}
|
||||
|
||||
ret = SSL_write(c->ssl, buf, size);
|
||||
if (ret > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue