Skip to content

Commit 413c566

Browse files
Enable sending dependency descriptor in group calls
1 parent 5a4c19b commit 413c566

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/rust/src/core/group_call.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,7 +3358,7 @@ impl Client {
33583358
.lock()
33593359
.expect("Get e2ee context to encrypt media");
33603360

3361-
let unencrypted_header_len = Self::unencrypted_media_header_len(is_audio, false);
3361+
let unencrypted_header_len = Self::unencrypted_media_header_len(is_audio, !is_audio);
33623362
Self::encrypt(
33633363
&mut frame_crypto_context,
33643364
unencrypted_header_len,
@@ -5393,15 +5393,12 @@ mod tests {
53935393
let plaintext = &b"Fake Video Needs To Be Bigger"[..];
53945394
let ciphertext1 = client1.encrypt_media(is_audio, plaintext).unwrap();
53955395

5396-
// Check that the first 10 bytes of video is left unencrypted
5397-
// and the rest has changed
5398-
assert_eq!(plaintext[..10], ciphertext1[..10]);
53995396
assert_ne!(plaintext, &ciphertext1[..plaintext.len()]);
54005397

54015398
assert_eq!(
54025399
plaintext,
54035400
client2
5404-
.decrypt_media(client1.demux_id, is_audio, &ciphertext1, false)
5401+
.decrypt_media(client1.demux_id, is_audio, &ciphertext1, true)
54055402
.unwrap()
54065403
);
54075404

@@ -5604,7 +5601,7 @@ mod tests {
56045601
assert_eq!(
56055602
plaintext,
56065603
client2
5607-
.decrypt_media(client1.demux_id, is_audio, &ciphertext, false)
5604+
.decrypt_media(client1.demux_id, is_audio, &ciphertext, true)
56085605
.unwrap()
56095606
);
56105607
}

0 commit comments

Comments
 (0)