Skip to content

Commit

Permalink
Additional test case
Browse files Browse the repository at this point in the history
  • Loading branch information
emarsden committed Sep 22, 2024
1 parent 6634d4e commit ef64d12
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ fn test_parsing_widevine_v0() {
assert_eq!(pd.content_id, Some(hex::decode("75433835414632527a563772357274646f3642436d704b423450647764566d43").unwrap()));
}
assert!(boxes.contains(&boxes[0]));

let boxes = from_base64("AAAAU3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADMIARIQ//Y9s82cGtnaeOe0vPYOJxoNYW1hem9udHZjcmltZSIIdGFtX3Rlc3QqAlNEMgA=")
.unwrap();
assert_eq!(boxes.len(), 1);
let pssh = &boxes[0];
assert_eq!(pssh.system_id, WIDEVINE_SYSTEM_ID);
assert_eq!(pssh.version, 0);
if let PsshData::Widevine(ref pd) = pssh.pssh_data {
assert!(pd.provider.clone().is_some_and(|p| p.eq("amazontvcrime")));
assert_eq!(pd.key_id[0], hex::decode("fff63db3cd9c1ad9da78e7b4bcf60e27").unwrap());
assert_eq!(pd.content_id, Some(hex::decode("74616d5f74657374").unwrap()));
}
assert!(boxes.contains(&boxes[0]));
}


Expand Down

0 comments on commit ef64d12

Please sign in to comment.