Compare commits

...

4 Commits

Author SHA1 Message Date
winlin
44f0c36b61 Release v4.0-r5, 4.0 release5, v4.0.271, 145574 lines. 2023-08-02 10:34:41 +08:00
winlin
6477f31004 Fix #3749: HLS: Ignore empty NALU to avoid error. v4.0.271 2023-08-02 10:17:14 +08:00
john
4e943005ff API: Fix HTTPS callback issue using SNI in TLS client handshake. v4.0.270 (#3695)
---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
2023-07-21 11:30:47 +08:00
winlin
55ca61ec9c Security: Enable CIDR for allow/deny play/publish. (#2914) 2023-01-03 17:07:17 +08:00
6 changed files with 14 additions and 4 deletions

View File

@ -131,6 +131,7 @@ A big THANK YOU goes to:
## Releases
* 2023-08-02, Release [v4.0-r5](https://github.com/ossrs/srs/releases/tag/v4.0-r5), v4.0-r5, 4.0 release5, v4.0.271, 145574 lines.
* 2022-11-22, Release [v4.0-r4](https://github.com/ossrs/srs/releases/tag/v4.0-r4), v4.0-r4, 4.0 release4, v4.0.268, 145482 lines.
* 2022-09-16, Release [v4.0-r3](https://github.com/ossrs/srs/releases/tag/v4.0-r3), v4.0-r3, 4.0 release3, v4.0.265, 145328 lines.
* 2022-08-24, Release [v4.0-r2](https://github.com/ossrs/srs/releases/tag/v4.0-r2), v4.0-r2, 4.0 release2, v4.0.257, 144890 lines.

View File

@ -8,6 +8,8 @@ The changelog for SRS.
## SRS 4.0 Changelog
* v4.0, 2023-08-02, Fix [#3749](https://github.com/ossrs/srs/issues/3749): HLS: Ignore empty NALU to avoid error. v4.0.271
* v4.0, 2023-07-21, Merge [#3695](https://github.com/ossrs/srs/pull/3695): API: Fix HTTPS callback issue using SNI in TLS client handshake. v4.0.270 (#3695)
* v4.0, 2022-12-24, For [#296](https://github.com/ossrs/srs/issues/296): MP3: Fix bug for TS or HLS with mp3 codec. v4.0.269
* v4.0, 2022-11-22, Pick [#3079](https://github.com/ossrs/srs/issues/3079): WebRTC: Fix no audio and video issue for Firefox. v4.0.268
* v4.0, 2022-10-10, For [#2901](https://github.com/ossrs/srs/issues/2901): Edge: Fast disconnect and reconnect. v4.0.267
@ -30,6 +32,7 @@ The changelog for SRS.
* v4.0, 2022-03-19, Merge [#2908](https://github.com/ossrs/srs/pull/2908): SRT: url supports multiple QueryStrings (#2908). v4.0.250
* v4.0, 2022-03-17, SRT: Support debug and run with CLion. v4.0.249
* v4.0, 2022-03-15, Merge [#2966](https://github.com/ossrs/srs/pull/2966): Bugfix: Fix rtcp nack blp encode bug (#2966). v4.0.248
* v4.0, 2022-03-11, Merge [#2914](https://github.com/ossrs/srs/pull/2914): Security: Enable CIDR for allow/deny play/publish.
* v4.0, 2022-03-07, RTC: Identify the WebRTC publisher in param for hooks. v4.0.247
* v4.0, 2022-03-07, SRT: Append vhost to stream, not app. v4.0.246
* v4.0, 2022-02-15, Fix warnings for uuid. v4.0.245

View File

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 269
#define VERSION_REVISION 271
#endif

View File

@ -544,6 +544,8 @@ srs_error_t SrsVideoFrame::add_sample(char* bytes, int size)
if ((err = SrsFrame::add_sample(bytes, size)) != srs_success) {
return srs_error_wrap(err, "add frame");
}
if (!bytes || size <= 0) return err;
// for video, parse the nalu type, set the IDR flag.
SrsAvcNaluType nal_unit_type = (SrsAvcNaluType)(bytes[0] & 0x1f);

View File

@ -54,7 +54,7 @@ SrsSslClient::~SrsSslClient()
}
}
srs_error_t SrsSslClient::handshake()
srs_error_t SrsSslClient::handshake(const std::string& host)
{
srs_error_t err = srs_success;
@ -86,6 +86,10 @@ srs_error_t SrsSslClient::handshake()
// SSL setup active, as client role.
SSL_set_connect_state(ssl);
SSL_set_mode(ssl, SSL_MODE_ENABLE_PARTIAL_WRITE);
// If the server address is not in IP address format, set the host in the Server Name Indication (SNI) field.
if (!srs_check_ip_addr_valid(host)) {
SSL_set_tlsext_host_name(ssl, host.c_str());
}
// Send ClientHello.
int r0 = SSL_do_handshake(ssl); int r1 = SSL_get_error(ssl, r0);
@ -465,7 +469,7 @@ srs_error_t SrsHttpClient::connect()
srs_utime_t starttime = srs_update_system_time();
if ((err = ssl_transport->handshake()) != srs_success) {
if ((err = ssl_transport->handshake(host)) != srs_success) {
disconnect();
return srs_error_wrap(err, "http: ssl connect %s %s:%d to=%dms, rto=%dms",
schema_.c_str(), host.c_str(), port, srsu2msi(timeout), srsu2msi(recv_timeout));

View File

@ -42,7 +42,7 @@ public:
SrsSslClient(SrsTcpClient* tcp);
virtual ~SrsSslClient();
public:
virtual srs_error_t handshake();
virtual srs_error_t handshake(const std::string& host);
public:
virtual srs_error_t read(void* buf, size_t size, ssize_t* nread);
virtual srs_error_t write(void* buf, size_t size, ssize_t* nwrite);