mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Upgrade libsrt to v1.5.3. v5.0.183 v6.0.81 (#3808)
fix https://github.com/ossrs/srs/issues/3155 Build srt-1-fit fails with `standard attributes in middle of decl-specifiers` on GCC 12,Arch Linux. See https://github.com/Haivision/srt/releases/tag/v1.5.3
This commit is contained in:
parent
f9bba0a9b0
commit
c5e067fb0b
94 changed files with 5974 additions and 6273 deletions
16
trunk/3rdparty/srt-1-fit/srtcore/common.h
vendored
16
trunk/3rdparty/srt-1-fit/srtcore/common.h
vendored
|
@ -53,7 +53,6 @@ modified by
|
|||
#ifndef INC_SRT_COMMON_H
|
||||
#define INC_SRT_COMMON_H
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS 1 // silences windows complaints for sscanf
|
||||
#include <memory>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
|
@ -1393,8 +1392,11 @@ inline ATR_CONSTEXPR uint32_t SrtVersion(int major, int minor, int patch)
|
|||
inline int32_t SrtParseVersion(const char* v)
|
||||
{
|
||||
int major, minor, patch;
|
||||
#if defined(_MSC_VER)
|
||||
int result = sscanf_s(v, "%d.%d.%d", &major, &minor, &patch);
|
||||
#else
|
||||
int result = sscanf(v, "%d.%d.%d", &major, &minor, &patch);
|
||||
|
||||
#endif
|
||||
if (result != 3)
|
||||
{
|
||||
return 0;
|
||||
|
@ -1409,12 +1411,16 @@ inline std::string SrtVersionString(int version)
|
|||
int minor = (version/0x100)%0x100;
|
||||
int major = version/0x10000;
|
||||
|
||||
char buf[20];
|
||||
sprintf(buf, "%d.%d.%d", major, minor, patch);
|
||||
char buf[22];
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
_snprintf(buf, sizeof(buf) - 1, "%d.%d.%d", major, minor, patch);
|
||||
#else
|
||||
snprintf(buf, sizeof(buf), "%d.%d.%d", major, minor, patch);
|
||||
#endif
|
||||
return buf;
|
||||
}
|
||||
|
||||
bool SrtParseConfig(std::string s, SrtConfig& w_config);
|
||||
bool SrtParseConfig(const std::string& s, SrtConfig& w_config);
|
||||
|
||||
} // namespace srt
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue