Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: webrtc/common_video/h264/profile_level_id.cc

Issue 2483173002: Negotiate H264 profiles in SDP (Closed)
Patch Set: Extract IsSameH264Profile and don't check payload type in FindMatchingCodec Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « webrtc/api/android/jni/androidmediaencoder_jni.cc ('k') | webrtc/common_video/h264/profile_level_id_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698