Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Apr 8, 2024
1 parent 1c5389f commit 85cfa3c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions api/crypto/frame_crypto_transformer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,13 @@ void FrameCryptorTransformer::encryptFrame(
}

rtc::ArrayView<const uint8_t> date_in = frame->GetData();
if (date_in.size() == 0 || !enabled_cryption) {
if (!enabled_cryption || date_in.size() == 0) {
RTC_LOG(LS_WARNING) << "FrameCryptorTransformer::encryptFrame() "
"date_in.size() == 0 || enabled_cryption == false";
if(!key_provider_->options().discard_frame_when_cryptor_not_ready) {
sink_callback->OnTransformedFrame(std::move(frame));
"enabled_cryption == false";
if(key_provider_->options().discard_frame_when_cryptor_not_ready) {
return;
}
sink_callback->OnTransformedFrame(std::move(frame));
return;
}

Expand Down Expand Up @@ -493,12 +494,14 @@ void FrameCryptorTransformer::decryptFrame(

rtc::ArrayView<const uint8_t> date_in = frame->GetData();

if (date_in.size() == 0 || !enabled_cryption) {
if (!enabled_cryption || date_in.size() == 0) {
RTC_LOG(LS_WARNING) << "FrameCryptorTransformer::decryptFrame() "
"date_in.size() == 0 || enabled_cryption == false";
if(!key_provider_->options().discard_frame_when_cryptor_not_ready) {
sink_callback->OnTransformedFrame(std::move(frame));
"enabled_cryption == false";
if(key_provider_->options().discard_frame_when_cryptor_not_ready) {
return;
}

sink_callback->OnTransformedFrame(std::move(frame));
return;
}

Expand Down

0 comments on commit 85cfa3c

Please sign in to comment.