Fix race condition in RTPSEnder.
In RTPSender::SendPayloadType(), payload_type_ should not be read without owning send_critsect_. BUG= R=pbos@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8199004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5778 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ff7908abfd
commit
efcad39f77
@ -275,7 +275,10 @@ int32_t RTPSender::DeRegisterSendPayload(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t RTPSender::SendPayloadType() const { return payload_type_; }
|
||||
int8_t RTPSender::SendPayloadType() const {
|
||||
CriticalSectionScoped cs(send_critsect_);
|
||||
return payload_type_;
|
||||
}
|
||||
|
||||
int RTPSender::SendPayloadFrequency() const {
|
||||
return audio_ != NULL ? audio_->AudioFrequency() : kVideoPayloadTypeFrequency;
|
||||
|
||||
@ -344,7 +344,7 @@ class RTPSender : public RTPSenderInterface, public Bitrate::Observer {
|
||||
uint16_t target_send_bitrate_;
|
||||
uint16_t packet_over_head_;
|
||||
|
||||
int8_t payload_type_;
|
||||
int8_t payload_type_ GUARDED_BY(send_critsect_);
|
||||
std::map<int8_t, ModuleRTPUtility::Payload *> payload_type_map_;
|
||||
|
||||
RtpHeaderExtensionMap rtp_header_extension_map_;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user