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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc

Issue 2462663002: Ensure one does not register same rtp header extension with different id (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « no previous file | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc
index 27bbda4cc937451a374cd89f3cb48b790716e27e..7fdff3498532ad43aef92592cafc94f463371b6d 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc
@@ -10,12 +10,15 @@
#include <assert.h>
+#include "webrtc/base/checks.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
namespace webrtc {
+constexpr uint8_t RtpHeaderExtensionMap::kInvalidId;
+
RtpHeaderExtensionMap::RtpHeaderExtensionMap() {
}
@@ -48,6 +51,7 @@ int32_t RtpHeaderExtensionMap::Register(RTPExtensionType type, uint8_t id) {
// so return success.
return 0;
}
+ RTC_DCHECK_EQ(kInvalidId, GetId(type));
extensionMap_[id] = new HeaderExtension(type);
return 0;
}
« no previous file with comments | « no previous file | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698