When the peerconnection creates the offer with a constraint to disable the audio offering, stats will not get properly updated.
constraints . SetMandatoryReceiveAudio (false); The problem is that webrtc::GetTrackIdBySsrc returns false if audio is not available. However it should continue and check for the video track. BUG=webrtc:3755 R=jiayl@webrtc.org, juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/22479004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7005 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
b0dc3d7204
commit
e21cc9ae2a
@ -224,30 +224,28 @@ static bool GetTrackIdBySsrc(const SessionDescription* session_description,
|
||||
cricket::StreamParams stream_out;
|
||||
const cricket::ContentInfo* audio_info =
|
||||
cricket::GetFirstAudioContent(session_description);
|
||||
if (!audio_info) {
|
||||
return false;
|
||||
}
|
||||
const cricket::MediaContentDescription* audio_content =
|
||||
static_cast<const cricket::MediaContentDescription*>(
|
||||
audio_info->description);
|
||||
if (audio_info) {
|
||||
const cricket::MediaContentDescription* audio_content =
|
||||
static_cast<const cricket::MediaContentDescription*>(
|
||||
audio_info->description);
|
||||
|
||||
if (cricket::GetStreamBySsrc(audio_content->streams(), ssrc, &stream_out)) {
|
||||
*track_id = stream_out.id;
|
||||
return true;
|
||||
if (cricket::GetStreamBySsrc(audio_content->streams(), ssrc, &stream_out)) {
|
||||
*track_id = stream_out.id;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const cricket::ContentInfo* video_info =
|
||||
cricket::GetFirstVideoContent(session_description);
|
||||
if (!video_info) {
|
||||
return false;
|
||||
}
|
||||
const cricket::MediaContentDescription* video_content =
|
||||
static_cast<const cricket::MediaContentDescription*>(
|
||||
video_info->description);
|
||||
if (video_info) {
|
||||
const cricket::MediaContentDescription* video_content =
|
||||
static_cast<const cricket::MediaContentDescription*>(
|
||||
video_info->description);
|
||||
|
||||
if (cricket::GetStreamBySsrc(video_content->streams(), ssrc, &stream_out)) {
|
||||
*track_id = stream_out.id;
|
||||
return true;
|
||||
if (cricket::GetStreamBySsrc(video_content->streams(), ssrc, &stream_out)) {
|
||||
*track_id = stream_out.id;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user