forked from DRMTalks/devine
HLS: Fix map data exists check when merging segments
`map_data` may resolve Truthy, while `map_data[1]` itself could be None, resulting in `None` being written to the stream.
This commit is contained in:
parent
2635d06d58
commit
7f898cf2df
|
@ -306,7 +306,7 @@ class HLS:
|
||||||
include_map_data: Whether to include the init map data.
|
include_map_data: Whether to include the init map data.
|
||||||
"""
|
"""
|
||||||
with open(to, "wb") as x:
|
with open(to, "wb") as x:
|
||||||
if include_map_data and map_data:
|
if include_map_data and map_data and map_data[1]:
|
||||||
x.write(map_data[1])
|
x.write(map_data[1])
|
||||||
for file in via:
|
for file in via:
|
||||||
x.write(file.read_bytes())
|
x.write(file.read_bytes())
|
||||||
|
|
Loading…
Reference in New Issue