Skip to content

Commit d563a8d

Browse files
committed
update.
1 parent 1c5389f commit d563a8d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

api/crypto/frame_crypto_transformer.cc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,11 @@ void FrameCryptorTransformer::encryptFrame(
385385
rtc::ArrayView<const uint8_t> date_in = frame->GetData();
386386
if (date_in.size() == 0 || !enabled_cryption) {
387387
RTC_LOG(LS_WARNING) << "FrameCryptorTransformer::encryptFrame() "
388-
"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));
388+
"enabled_cryption == false";
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

@@ -495,10 +496,12 @@ void FrameCryptorTransformer::decryptFrame(
495496

496497
if (date_in.size() == 0 || !enabled_cryption) {
497498
RTC_LOG(LS_WARNING) << "FrameCryptorTransformer::decryptFrame() "
498-
"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));
499+
"enabled_cryption == false";
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)