Skip to content

Commit

Permalink
patch 10
Browse files Browse the repository at this point in the history
Change-Id: Ibd3081ff3d6d0af965584dcdd07077b9ff54c104
  • Loading branch information
mithydolphin committed Sep 20, 2024
1 parent 88fdd81 commit 18b156b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/src/signed_video_h26x_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,11 @@ verify_gop_hash(signed_video_t *self)
* If the linked hash has not yet been updated with this NALU's hash, it updates the
* linked hash with the first NALU hash and marks it as used.
*/
void
static void
update_link_hash_for_auth(signed_video_t *self)
{
const size_t hash_size = self->verify_data->hash_size;
h26x_nalu_list_t *nalu_list = self->nalu_list;
h26x_nalu_list_item_t *item = nalu_list->first_item;
h26x_nalu_list_item_t *item = self->nalu_list->first_item;
while (item) {
if (item->used_in_gop_hash && item->nalu->is_first_nalu_in_gop) {
if (!item->used_for_linked_hash) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/signed_video_h26x_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,8 @@ check_and_copy_hash_to_hash_list(signed_video_t *self, const uint8_t *hash, size

/*
* Updates the |linked_hash| buffer with the |hash|. The buffer contains 2 slots for hashes.
* When a new NALU is encountered in the stream, the values in the buffer are shifted, and the
* new hash is stored in the second slot, with the previous hash moved to the first slot.
* The values in the buffer are shifted, with the new hash stored in the second slot and the
* previous hash moved to the first slot.
*/
svrc_t
update_linked_hash(signed_video_t *self, uint8_t *hash, size_t hash_size)
Expand Down
1 change: 0 additions & 1 deletion lib/src/signed_video_h26x_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ signed_video_add_nalu_part_for_signing_with_timestamp(signed_video_t *self,
// adding it to the SEI NALU. Now it is time to start a new GOP, that is, hash and add this
// first NALU of the GOP.
SV_THROW(hash_and_add(self, &nalu));
// Update link hash with |self->gop_info->nalu_hash|.
SV_THROW(update_linked_hash(self, self->gop_info->nalu_hash, self->sign_data->hash_size));
}
}
Expand Down

0 comments on commit 18b156b

Please sign in to comment.