mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine play stream init
This commit is contained in:
parent
3fea5c0ec3
commit
f5ff28d47a
1 changed files with 11 additions and 12 deletions
|
@ -429,19 +429,18 @@ srs_error_t SrsRtcPlayStream::initialize(SrsRequest* req, std::map<uint32_t, Srs
|
|||
return srs_error_wrap(err, "rtc fetch source failed");
|
||||
}
|
||||
|
||||
if (true) {
|
||||
std::map<uint32_t, SrsRtcTrackDescription*>::iterator it = sub_relations.begin();
|
||||
while (it != sub_relations.end()) {
|
||||
if (it->second->type_ == "audio") {
|
||||
SrsRtcAudioSendTrack* track = new SrsRtcAudioSendTrack(session_, it->second);
|
||||
audio_tracks_.insert(make_pair(it->first, track));
|
||||
for (map<uint32_t, SrsRtcTrackDescription*>::iterator it = sub_relations.begin(); it != sub_relations.end(); ++it) {
|
||||
uint32_t ssrc = it->first;
|
||||
SrsRtcTrackDescription* desc = it->second;
|
||||
|
||||
if (desc->type_ == "audio") {
|
||||
SrsRtcAudioSendTrack* track = new SrsRtcAudioSendTrack(session_, desc);
|
||||
audio_tracks_.insert(make_pair(ssrc, track));
|
||||
}
|
||||
|
||||
if (it->second->type_ == "video") {
|
||||
SrsRtcVideoSendTrack* track = new SrsRtcVideoSendTrack(session_, it->second);
|
||||
video_tracks_.insert(make_pair(it->first, track));
|
||||
}
|
||||
++it;
|
||||
if (desc->type_ == "video") {
|
||||
SrsRtcVideoSendTrack* track = new SrsRtcVideoSendTrack(session_, desc);
|
||||
video_tracks_.insert(make_pair(ssrc, track));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue