mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
DTLS: Disable QueryMTU for openssl, or the packet get fragmented
This commit is contained in:
parent
079c54bbe7
commit
3a5d88b435
1 changed files with 5 additions and 0 deletions
|
@ -418,6 +418,11 @@ srs_error_t SrsDtlsImpl::initialize(std::string version)
|
||||||
SSL_set_ex_data(dtls, 0, this);
|
SSL_set_ex_data(dtls, 0, this);
|
||||||
SSL_set_info_callback(dtls, ssl_on_info);
|
SSL_set_info_callback(dtls, ssl_on_info);
|
||||||
|
|
||||||
|
// set dtls fragment
|
||||||
|
// @see https://stackoverflow.com/questions/62413602/openssl-server-packets-get-fragmented-into-270-bytes-per-packet
|
||||||
|
SSL_set_options(dtls, SSL_OP_NO_QUERY_MTU);
|
||||||
|
SSL_set_mtu(dtls, kRtpPacketSize);
|
||||||
|
|
||||||
if ((bio_in = BIO_new(BIO_s_mem())) == NULL) {
|
if ((bio_in = BIO_new(BIO_s_mem())) == NULL) {
|
||||||
return srs_error_new(ERROR_OpenSslBIONew, "BIO_new in");
|
return srs_error_new(ERROR_OpenSslBIONew, "BIO_new in");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue