SessionData: Must have either VALUE or URI, but not both.

If SessionData has a value, don't write the URI and vice-versa.

As per https://tools.ietf.org/html/rfc8216#section-4.3.4.4
EXT-X-SESSION-DATA must have one or the other, not both.
This commit is contained in:
Jan Schmidt
2021-04-20 02:35:45 +10:00
parent 85b0826103
commit 870ca830d3
3 changed files with 49 additions and 22 deletions

View File

@ -333,12 +333,13 @@ fn create_and_parse_master_playlist_full() {
closed_captions: Some("closed_captions".into()),
}
],
session_data: Some(SessionData {
data_id: "****".into(),
value: "%%%%".into(),
uri: "++++".into(),
language: Some("SessionDataLanguage".into()),
}),
session_data: Some(
SessionData {
data_id: "****".into(),
field: SessionDataField::Value("%%%%".to_string()),
language: Some("SessionDataLanguage".into()),
}
),
session_key: Some(SessionKey(Key {
method: "AES-128".into(),
uri: Some("https://secure.domain.com".into()),