Index: webrtc/common_video/h264/profile_level_id.cc |
diff --git a/webrtc/common_video/h264/profile_level_id.cc b/webrtc/common_video/h264/profile_level_id.cc |
index c7e933ac32b7d363b5e34d83238818f33f377863..f682862ca1a0bdc4e4fddd0100ec7280deac6b84 100644 |
--- a/webrtc/common_video/h264/profile_level_id.cc |
+++ b/webrtc/common_video/h264/profile_level_id.cc |
@@ -263,6 +263,14 @@ void GenerateProfileLevelIdForAnswer( |
const CodecParameterMap& local_supported_params, |
const CodecParameterMap& remote_offered_params, |
CodecParameterMap* answer_params) { |
+ // If both local and remote haven't set profile-level-id, they are both using |
+ // the default profile. In this case, don't set profile-level-id in answer |
+ // either. |
+ if (!local_supported_params.count(kProfileLevelId) && |
+ !remote_offered_params.count(kProfileLevelId)) { |
+ return; |
+ } |
+ |
// Parse profile-level-ids. |
const rtc::Optional<ProfileLevelId> local_profile_level_id = |
ParseSdpProfileLevelId(local_supported_params); |