Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit cbd0d06

Browse files
committed
Set H.264 frame type correctly.
1 parent f377b9b commit cbd0d06

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

talk/owt/sdk/base/customizedvideoencoderproxy.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ int32_t CustomizedVideoEncoderProxy::Encode(
211211
info.codecSpecific.H264.idr_frame = is_idr;
212212
info.codecSpecific.H264.base_layer_sync = (!is_idr && (temporal_id > 0));
213213
}
214+
encodedframe._frameType = is_idr ? webrtc::VideoFrameType::kVideoFrameKey
215+
: webrtc::VideoFrameType::kVideoFrameDelta;
214216
}
215217
const auto result = callback_->OnEncodedImage(encodedframe, &info);
216218
if (result.error != webrtc::EncodedImageCallback::Result::Error::OK) {

talk/owt/sdk/p2p/p2ppeerconnectionchannel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ void P2PPeerConnectionChannel::OnMessageSignal(Json::Value& message) {
508508
RTC_LOG(LS_WARNING) << "Failed to add remote candidate.";
509509
}
510510
} else{
511-
rtc::CritScope cs(&pending_remote_candidates_crit_);
511+
webrtc::MutexLock lock(&pending_remote_candidates_crit_);
512512
pending_remote_candidates_.push_back(
513513
std::unique_ptr<webrtc::IceCandidateInterface>(ice_candidate));
514514
RTC_LOG(LS_VERBOSE) << "Remote candidate is stored because remote "
@@ -1262,7 +1262,7 @@ void P2PPeerConnectionChannel::DrainPendingMessages() {
12621262
}
12631263

12641264
void P2PPeerConnectionChannel::DrainPendingRemoteCandidates() {
1265-
rtc::CritScope cs(&pending_remote_candidates_crit_);
1265+
webrtc::MutexLock lock(&pending_remote_candidates_crit_);
12661266
for (auto& ice_candidate : pending_remote_candidates_) {
12671267
if (!peer_connection_->AddIceCandidate(ice_candidate.get())) {
12681268
RTC_LOG(LS_WARNING) << "Failed to add remote candidate.";

talk/owt/sdk/p2p/p2ppeerconnectionchannel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class P2PPeerConnectionChannel : public P2PSignalingReceiverInterface,
213213
pending_messages_;
214214
// Protects |pending_messages_|.
215215
std::mutex pending_messages_mutex_;
216-
rtc::CriticalSection pending_remote_candidates_crit_;
216+
webrtc::Mutex pending_remote_candidates_crit_;
217217
std::vector<std::unique_ptr<webrtc::IceCandidateInterface>>
218218
pending_remote_candidates_
219219
RTC_GUARDED_BY(pending_remote_candidates_crit_);

0 commit comments

Comments
 (0)