Skip to content

Commit 6ff8132

Browse files
authored
Minor code cleanups (#492)
Co-authored-by: bjornvolcker <[email protected]>
1 parent 9fdc040 commit 6ff8132

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/src/sv_auth.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ validate_authenticity(signed_video_t *self, bu_list_item_t *sei)
697697

698698
SignedVideoAuthenticityResult valid = SV_AUTH_RESULT_NOT_OK;
699699
// Initialize to "Unknown"
700-
int num_expected = self->gop_info->num_sent;
700+
int num_expected = gop_info->num_sent;
701701
int num_received = self->tmp_num_in_partial_gop;
702702
int num_invalid = -1;
703703
int num_missed = -1;
@@ -711,7 +711,7 @@ validate_authenticity(signed_video_t *self, bu_list_item_t *sei)
711711
sei = NULL;
712712
verify_success = verify_hashes_without_sei(self, gop_info->num_sent);
713713
// If a GOP was verified without a SEI, increment the |current_partial_gop|.
714-
if (self->validation_flags.signing_present && verify_success) {
714+
if (validation_flags->signing_present && verify_success) {
715715
gop_info->current_partial_gop++;
716716
}
717717
num_expected = -1;
@@ -788,13 +788,13 @@ validate_authenticity(signed_video_t *self, bu_list_item_t *sei)
788788
num_received = -1;
789789
// If no valid Bitstream Units were found, reset validation to be able to make more
790790
// attepts to synchronize the SEIs.
791-
self->validation_flags.reset_first_validation = !has_valid_bu;
791+
validation_flags->reset_first_validation = !has_valid_bu;
792792
}
793793
}
794794
if (latest->public_key_has_changed) valid = SV_AUTH_RESULT_NOT_OK;
795795

796796
if (valid == SV_AUTH_RESULT_OK) {
797-
self->validation_flags.sei_in_sync = true;
797+
validation_flags->sei_in_sync = true;
798798
}
799799

800800
// Update |latest_validation| with the validation result.
@@ -809,17 +809,17 @@ validate_authenticity(signed_video_t *self, bu_list_item_t *sei)
809809
latest->authenticity = valid;
810810
}
811811
latest->number_of_received_picture_nalus += num_received;
812-
if (self->validation_flags.num_lost_seis > 0) {
812+
if (validation_flags->num_lost_seis > 0) {
813813
latest->number_of_expected_picture_nalus = -1;
814814
} else if (latest->number_of_expected_picture_nalus != -1) {
815815
latest->number_of_expected_picture_nalus += num_expected;
816816
}
817817
// Update |current_partial_gop| and |num_lost_seis| w.r.t. if SEI is in sync.
818-
if (self->validation_flags.sei_in_sync) {
818+
if (validation_flags->sei_in_sync) {
819819
gop_info->current_partial_gop = gop_info->next_partial_gop;
820-
self->validation_flags.num_lost_seis = 0;
820+
validation_flags->num_lost_seis = 0;
821821
} else {
822-
self->validation_flags.num_lost_seis =
822+
validation_flags->num_lost_seis =
823823
gop_info->next_partial_gop - gop_info->current_partial_gop - 1;
824824
}
825825
}

0 commit comments

Comments
 (0)