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

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

Issue 2491273002: Cleanup RtpHeaderExtensionMap removing use of two legacy functions (Closed)
Patch Set: rebase 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_utility.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
index 7dd59736fd044d855d0ae11ed146bd327c948e7f..cc0d650a5cd01c61370852e127d5f5ea25b156a9 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
@@ -331,8 +331,8 @@ void RtpHeaderParser::ParseOneByteExtensionHeader(
return;
}
- RTPExtensionType type;
- if (ptrExtensionMap->GetType(id, &type) != 0) {
+ RTPExtensionType type = ptrExtensionMap->GetType(id);
+ if (type == RtpHeaderExtensionMap::kInvalidType) {
// If we encounter an unknown extension, just skip over it.
LOG(LS_WARNING) << "Failed to find extension id: " << id;
} else {
@@ -439,8 +439,9 @@ void RtpHeaderParser::ParseOneByteExtensionHeader(
max_playout_delay * kPlayoutDelayGranularityMs;
break;
}
- default: {
- LOG(LS_WARNING) << "Extension type not implemented: " << type;
+ case kRtpExtensionNone:
+ case kRtpExtensionNumberOfExtensions: {
+ RTC_NOTREACHED() << "Invalid extension type: " << type;
return;
}
}
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_header_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698