OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 } else { | 2365 } else { |
2366 LOG(LS_WARNING) << "Unsupported media type: " << line; | 2366 LOG(LS_WARNING) << "Unsupported media type: " << line; |
2367 continue; | 2367 continue; |
2368 } | 2368 } |
2369 if (!content.get()) { | 2369 if (!content.get()) { |
2370 // ParseContentDescription returns NULL if failed. | 2370 // ParseContentDescription returns NULL if failed. |
2371 return false; | 2371 return false; |
2372 } | 2372 } |
2373 | 2373 |
2374 bool content_rejected = false; | 2374 bool content_rejected = false; |
| 2375 // A port of 0 is not interpreted as a rejected m= section when it's |
| 2376 // used along with a=bundle-only. |
2375 if (bundle_only) { | 2377 if (bundle_only) { |
2376 // A port of 0 is not interpreted as a rejected m= section when it's | |
2377 // used along with a=bundle-only. | |
2378 if (!port_rejected) { | 2378 if (!port_rejected) { |
2379 return ParseFailed( | 2379 // Usage of bundle-only with a nonzero port is unspecified. So just |
2380 "a=bundle-only", | 2380 // ignore bundle-only if we see this. |
2381 "a=bundle-only MUST only be used in combination with a 0 port.", | 2381 bundle_only = false; |
2382 error); | 2382 LOG(LS_WARNING) |
| 2383 << "a=bundle-only attribute observed with a nonzero " |
| 2384 << "port; this usage is unspecified so the attribute is being " |
| 2385 << "ignored."; |
2383 } | 2386 } |
2384 } else { | 2387 } else { |
2385 // If not using bundle-only, interpret port 0 in the normal way; the m= | 2388 // If not using bundle-only, interpret port 0 in the normal way; the m= |
2386 // section is being rejected. | 2389 // section is being rejected. |
2387 content_rejected = port_rejected; | 2390 content_rejected = port_rejected; |
2388 } | 2391 } |
2389 | 2392 |
2390 if (IsRtp(protocol)) { | 2393 if (IsRtp(protocol)) { |
2391 // Set the extmap. | 2394 // Set the extmap. |
2392 if (!session_extmaps.empty() && | 2395 if (!session_extmaps.empty() && |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3221 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3224 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
3222 media_desc, payload_type, feedback_param); | 3225 media_desc, payload_type, feedback_param); |
3223 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3226 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
3224 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3227 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
3225 media_desc, payload_type, feedback_param); | 3228 media_desc, payload_type, feedback_param); |
3226 } | 3229 } |
3227 return true; | 3230 return true; |
3228 } | 3231 } |
3229 | 3232 |
3230 } // namespace webrtc | 3233 } // namespace webrtc |
OLD | NEW |