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

mkv/webm cleanup #191

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
mkv/webm: use ranges in find method
  • Loading branch information
CatKasha authored Oct 13, 2024
commit e3ccf8e77e0c2f13aee083a2cc4d167f227d0221
4 changes: 2 additions & 2 deletions filetype/types/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def match(self, buf):
buf[1] == 0x45 and
buf[2] == 0xDF and
buf[3] == 0xA3):
return buf[5:64].find(b"matroska") > -1
return buf.find(b"matroska", 5, 64) > -1


class Webm(Type):
Expand All @@ -94,7 +94,7 @@ def match(self, buf):
buf[1] == 0x45 and
buf[2] == 0xDF and
buf[3] == 0xA3):
return buf[5:64].find(b"webm") > -1
return buf.find(b"webm", 5, 64) > -1


class Mov(IsoBmff):
Expand Down
Loading