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 6437e0f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions api/crypto/frame_crypto_transformer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,10 @@ void FrameCryptorTransformer::encryptFrame(
if (date_in.size() == 0 || !enabled_cryption) {
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));
if(key_provider_->options().discard_frame_when_cryptor_not_ready) {
return;
}
sink_callback->OnTransformedFrame(std::move(frame));
return;
}

Expand Down Expand Up @@ -496,9 +497,11 @@ void FrameCryptorTransformer::decryptFrame(
if (date_in.size() == 0 || !enabled_cryption) {
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));
if(key_provider_->options().discard_frame_when_cryptor_not_ready) {
return;
}

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

Expand Down

0 comments on commit 6437e0f

Please sign in to comment.