mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
提升sdp解析兼容性
This commit is contained in:
parent
eb12bc7397
commit
e5cb5c56a1
@ -61,7 +61,7 @@ Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
|
|||||||
|
|
||||||
if (strcasecmp(track->_codec.data(), "h264") == 0) {
|
if (strcasecmp(track->_codec.data(), "h264") == 0) {
|
||||||
//a=fmtp:96 packetization-mode=1;profile-level-id=42C01F;sprop-parameter-sets=Z0LAH9oBQBboQAAAAwBAAAAPI8YMqA==,aM48gA==
|
//a=fmtp:96 packetization-mode=1;profile-level-id=42C01F;sprop-parameter-sets=Z0LAH9oBQBboQAAAAwBAAAAPI8YMqA==,aM48gA==
|
||||||
auto map = Parser::parseArgs(track->_fmtp,";","=");
|
auto map = Parser::parseArgs(FindField(track->_fmtp.data()," ", nullptr),";","=");
|
||||||
for(auto &pr : map){
|
for(auto &pr : map){
|
||||||
trim(pr.second);
|
trim(pr.second);
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
|
|||||||
|
|
||||||
if (strcasecmp(track->_codec.data(), "h265") == 0) {
|
if (strcasecmp(track->_codec.data(), "h265") == 0) {
|
||||||
//a=fmtp:96 sprop-sps=QgEBAWAAAAMAsAAAAwAAAwBdoAKAgC0WNrkky/AIAAADAAgAAAMBlQg=; sprop-pps=RAHA8vA8kAA=
|
//a=fmtp:96 sprop-sps=QgEBAWAAAAMAsAAAAwAAAwBdoAKAgC0WNrkky/AIAAADAAgAAAMBlQg=; sprop-pps=RAHA8vA8kAA=
|
||||||
auto map = Parser::parseArgs(track->_fmtp,";","=");
|
auto map = Parser::parseArgs(FindField(track->_fmtp.data()," ", nullptr),";","=");
|
||||||
for(auto &pr : map){
|
for(auto &pr : map){
|
||||||
trim(pr.second);
|
trim(pr.second);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user