mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-04-30 01:59:44 +00:00
Device: Re-use magic reference across Structures
This commit is contained in:
parent
f2174dfa72
commit
70e79825b3
@ -23,13 +23,15 @@ class _Types(Enum):
|
|||||||
|
|
||||||
|
|
||||||
class _Structures:
|
class _Structures:
|
||||||
|
magic = Const(b"WVD")
|
||||||
|
|
||||||
header = Struct(
|
header = Struct(
|
||||||
"signature" / Const(b"WVD"),
|
"signature" / magic,
|
||||||
"version" / Int8ub
|
"version" / Int8ub
|
||||||
)
|
)
|
||||||
|
|
||||||
v2 = Struct(
|
v2 = Struct(
|
||||||
"signature" / Const(b"WVD"),
|
"signature" / magic,
|
||||||
"version" / Const(Int8ub, 2),
|
"version" / Const(Int8ub, 2),
|
||||||
"type_" / CEnum(
|
"type_" / CEnum(
|
||||||
Int8ub,
|
Int8ub,
|
||||||
@ -47,7 +49,7 @@ class _Structures:
|
|||||||
)
|
)
|
||||||
|
|
||||||
v1 = Struct(
|
v1 = Struct(
|
||||||
"signature" / Const(b"WVD"),
|
"signature" / magic,
|
||||||
"version" / Const(Int8ub, 1),
|
"version" / Const(Int8ub, 1),
|
||||||
"type_" / CEnum(
|
"type_" / CEnum(
|
||||||
Int8ub,
|
Int8ub,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user