From e3941e4640fd3e6f227fb2669361275d4b8f2c60 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sun, 23 Apr 2023 22:39:14 +0100 Subject: [PATCH] Remove now unnecessary explicit version checks on tenc boxes pymp4 was updated to automatically do this during parsing and building of tenc boxes. Therefore it would instead fail parsing if the version is not 0 or 1. --- devine/core/tracks/track.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devine/core/tracks/track.py b/devine/core/tracks/track.py index 9c35b35..62f618e 100644 --- a/devine/core/tracks/track.py +++ b/devine/core/tracks/track.py @@ -121,14 +121,14 @@ class Track: # look for track encryption mp4 boxes for tenc in get_boxes(init_data, b"tenc"): - if tenc.version <= 1 and tenc.key_ID.int != 0: + if tenc.key_ID.int != 0: return tenc.key_ID # look for UUID mp4 boxes holding track encryption mp4 boxes for uuid_box in get_boxes(init_data, b"uuid"): if uuid_box.extended_type == UUID("8974dbce-7be7-4c51-84f9-7148f9882554"): tenc = uuid_box.data - if tenc.version <= 1 and tenc.key_ID.int != 0: + if tenc.key_ID.int != 0: return tenc.key_ID def get_init_segment(