Check associated payload type when negotiate RTX codecs.

At the moment, only payload name is checked when match two RTX codecs.
This will cause wrong behavior of codec negotiation if multiple RTX codecs
are added.

BUG=
R=pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34189004

Cr-Commit-Position: refs/heads/master@{#8727}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8727 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
changbin.shao@webrtc.org
2015-03-16 04:14:34 +00:00
parent eb44fd6e81
commit 2d25b44f47
6 changed files with 196 additions and 77 deletions

View File

@@ -66,20 +66,6 @@ DataMediaChannel* RtpDataEngine::CreateChannel(
return new RtpDataMediaChannel(timing_.get());
}
// TODO(pthatcher): Should we move these find/get functions somewhere
// common?
bool FindCodecById(const std::vector<DataCodec>& codecs,
int id, DataCodec* codec_out) {
std::vector<DataCodec>::const_iterator iter;
for (iter = codecs.begin(); iter != codecs.end(); ++iter) {
if (iter->id == id) {
*codec_out = *iter;
return true;
}
}
return false;
}
bool FindCodecByName(const std::vector<DataCodec>& codecs,
const std::string& name, DataCodec* codec_out) {
std::vector<DataCodec>::const_iterator iter;