Remove the redundant method GetPayloadSpecifics
It's in the way of a refactoring. Also change PayloadTypeToPayload---the method all callers can use instead---to return Optional<Payload> instead of const Payload* (for thread safety reasons: an object that protects itself with a mutex shouldn't be handing out pointers to parts of itself). BUG=webrtc:8159 Change-Id: I7ef0d545077ffdea016b309f2165e3c4955a2928 Reviewed-on: https://webrtc-review.googlesource.com/2360 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19917}
This commit is contained in:
@ -294,7 +294,7 @@ void RtpReceiverImpl::CheckSSRCChanged(const RTPHeader& rtp_header) {
|
||||
if (rtp_header.payloadType == last_received_payload_type) {
|
||||
re_initialize_decoder = true;
|
||||
|
||||
const Payload* payload = rtp_payload_registry_->PayloadTypeToPayload(
|
||||
const auto payload = rtp_payload_registry_->PayloadTypeToPayload(
|
||||
rtp_header.payloadType);
|
||||
if (!payload) {
|
||||
return;
|
||||
@ -382,7 +382,7 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header,
|
||||
return 0;
|
||||
}
|
||||
|
||||
const Payload* payload =
|
||||
const auto payload =
|
||||
rtp_payload_registry_->PayloadTypeToPayload(payload_type);
|
||||
if (!payload) {
|
||||
// Not a registered payload type.
|
||||
|
||||
Reference in New Issue
Block a user