mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2024-12-21 05:30:20 +00:00
fix
This commit is contained in:
parent
ea58c2f5b9
commit
19ffa000f9
4
main.py
4
main.py
@ -14,14 +14,14 @@ def main(argv):
|
|||||||
filename = argv[1]
|
filename = argv[1]
|
||||||
m = movie.Movie(filename)
|
m = movie.Movie(filename)
|
||||||
|
|
||||||
if len(argv) >= 2:
|
if len(argv) >= 3:
|
||||||
out_filename = argv[2]
|
out_filename = argv[2]
|
||||||
else:
|
else:
|
||||||
out_filename = ".".join(filename.split(".")[:-1] + ["a2m"])
|
out_filename = ".".join(filename.split(".")[:-1] + ["a2m"])
|
||||||
|
|
||||||
with open(out_filename, "wb") as out:
|
with open(out_filename, "wb") as out:
|
||||||
for bytes_out, b in enumerate(m.emit_stream(m.encode())):
|
for bytes_out, b in enumerate(m.emit_stream(m.encode())):
|
||||||
out.write(bytes(b))
|
out.write(bytearray([b]))
|
||||||
|
|
||||||
if bytes_out >= MAX_OUT:
|
if bytes_out >= MAX_OUT:
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user