Index: webrtc/pc/mediasession.cc |
diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc |
index cc93a8b170619e834efc44c0f2bdc0f2f860e656..f91a7297204541d7fcf24b82b053273e9dc614f6 100644 |
--- a/webrtc/pc/mediasession.cc |
+++ b/webrtc/pc/mediasession.cc |
@@ -22,6 +22,7 @@ |
#include "webrtc/base/helpers.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/base/stringutils.h" |
+#include "webrtc/common_video/h264/profile_level_id.h" |
#include "webrtc/media/base/cryptoparams.h" |
#include "webrtc/media/base/mediaconstants.h" |
#include "webrtc/p2p/base/p2pconstants.h" |
@@ -778,6 +779,10 @@ static void NegotiateCodecs(const std::vector<C>& local_codecs, |
RTC_DCHECK(apt_it != theirs.params.end()); |
negotiated.SetParam(kCodecParamAssociatedPayloadType, apt_it->second); |
} |
+ if (CodecNamesEq(ours.name.c_str(), kH264CodecName)) { |
+ webrtc::H264::GenerateProfileLevelIdForAnswer( |
+ ours.params, theirs.params, &negotiated.params); |
+ } |
negotiated.id = theirs.id; |
negotiated.name = theirs.name; |
negotiated_codecs->push_back(std::move(negotiated)); |