mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 10:42:31 -05:00
linter
This commit is contained in:
parent
d2d940ef25
commit
cd6e20b68e
2 changed files with 1 additions and 1 deletions
|
@ -91,6 +91,7 @@ def unpack_ver_flags(value: bytes) -> Tuple[int, int]:
|
||||||
MP4_CONTAINER_BOXES = ('moov', 'trak', 'edts', 'mdia', 'minf', 'dinf', 'stbl', 'mvex', 'moof', 'traf', 'vttc', 'tref', 'iref', 'mfra', 'meco', 'hnti', 'hinf', 'strk', 'strd', 'sinf', 'rinf', 'schi', 'trgr', 'udta', 'iprp', 'ipco')
|
MP4_CONTAINER_BOXES = ('moov', 'trak', 'edts', 'mdia', 'minf', 'dinf', 'stbl', 'mvex', 'moof', 'traf', 'vttc', 'tref', 'iref', 'mfra', 'meco', 'hnti', 'hinf', 'strk', 'strd', 'sinf', 'rinf', 'schi', 'trgr', 'udta', 'iprp', 'ipco')
|
||||||
""" List of boxes that nests the other boxes """
|
""" List of boxes that nests the other boxes """
|
||||||
|
|
||||||
|
|
||||||
def parse_mp4_boxes(r: RawIOBase):
|
def parse_mp4_boxes(r: RawIOBase):
|
||||||
"""
|
"""
|
||||||
Parses an ISO BMFF (which MP4 follows) and yields its boxes as a sequence.
|
Parses an ISO BMFF (which MP4 follows) and yields its boxes as a sequence.
|
||||||
|
|
|
@ -102,7 +102,6 @@ def transform(r, bmdt_offset, sdur_cutoff):
|
||||||
continue
|
continue
|
||||||
yield (btype, content)
|
yield (btype, content)
|
||||||
|
|
||||||
|
|
||||||
def modify_mp4(self, src, dst, bmdt_offset, sdur_cutoff):
|
def modify_mp4(self, src, dst, bmdt_offset, sdur_cutoff):
|
||||||
with open(src, 'rb') as r, open(dst, 'wb') as w:
|
with open(src, 'rb') as r, open(dst, 'wb') as w:
|
||||||
write_mp4_boxes(w, self.transform(parse_mp4_boxes(r)))
|
write_mp4_boxes(w, self.transform(parse_mp4_boxes(r)))
|
||||||
|
|
Loading…
Reference in a new issue