mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Define colorinfo even if no header line found
This commit is contained in:
parent
9ea0fbc6de
commit
2c8bf9d400
1 changed files with 1 additions and 2 deletions
|
@ -31,12 +31,11 @@ def openvideo(name):
|
|||
sys.exit(1)
|
||||
line = f.readline()
|
||||
if not line: raise EndOfFile
|
||||
colorinfo = (8, 0, 0, 0)
|
||||
if line[:4] == 'CMIF':
|
||||
if line[:14] == 'CMIF video 2.0':
|
||||
line = f.readline()
|
||||
colorinfo = eval(line[:-1])
|
||||
else:
|
||||
colorinfo = (8,0,0,0)
|
||||
line = f.readline()
|
||||
x = eval(line[:-1])
|
||||
if len(x) == 3: w, h, pf = x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue