Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #373: Import EXT-X-CUE-OUT and EXT-X-CUE-OUT-CONT handling #374

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

bbayles
Copy link
Contributor

@bbayles bbayles commented Jul 30, 2024

This PR updates the handling for EXT-X-CUE-OUT and EXT-X-CUE-OUT-CONT tags.

Previously the parsers for these tags attempted to understand a few different vendor formats, but I've tried to simplify things to avoid crashing when novel ones are encountered.

Closes #373

name, value = param.split("=", 1)
name = normalize_attribute(name)
param_parts = param.split("=", 1)
if len(param_parts) == 1:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change affects all tags - if there's some parameter without a key=value pair, it will get stuck into the empty string key.

@@ -273,7 +281,7 @@ def test_segment_envivio_scte35_attribute():
def test_segment_unknown_scte35_attribute():
obj = m3u8.M3U8(playlists.CUE_OUT_INVALID_PLAYLIST)
assert obj.segments[0].scte35 is None
assert obj.segments[0].scte35_duration is None
assert obj.segments[0].scte35_duration == "INVALID"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now no longer assume a particular format for duration, so weird fraction stuff can flow through.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great! Thank you

@mauricioabreu mauricioabreu merged commit 1f62ed2 into globocom:master Jul 30, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MediaConvert EXT-CUE-OUT-CONT still problematic
2 participants