Skip to content

Commit 6437e0f

Browse files
committed
update.
1 parent 1c5389f commit 6437e0f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

api/crypto/frame_crypto_transformer.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,10 @@ void FrameCryptorTransformer::encryptFrame(
386386
if (date_in.size() == 0 || !enabled_cryption) {
387387
RTC_LOG(LS_WARNING) << "FrameCryptorTransformer::encryptFrame() "
388388
"date_in.size() == 0 || enabled_cryption == false";
389-
if(!key_provider_->options().discard_frame_when_cryptor_not_ready) {
390-
sink_callback->OnTransformedFrame(std::move(frame));
389+
if(key_provider_->options().discard_frame_when_cryptor_not_ready) {
390+
return;
391391
}
392+
sink_callback->OnTransformedFrame(std::move(frame));
392393
return;
393394
}
394395

@@ -496,9 +497,11 @@ void FrameCryptorTransformer::decryptFrame(
496497
if (date_in.size() == 0 || !enabled_cryption) {
497498
RTC_LOG(LS_WARNING) << "FrameCryptorTransformer::decryptFrame() "
498499
"date_in.size() == 0 || enabled_cryption == false";
499-
if(!key_provider_->options().discard_frame_when_cryptor_not_ready) {
500-
sink_callback->OnTransformedFrame(std::move(frame));
500+
if(key_provider_->options().discard_frame_when_cryptor_not_ready) {
501+
return;
501502
}
503+
504+
sink_callback->OnTransformedFrame(std::move(frame));
502505
return;
503506
}
504507

0 commit comments

Comments
 (0)