|
@@ -17,10 +17,13 @@ def analyzeANIFile(filePath):
|
|
|
return {"code":-1,"msg":"File is not a ANI File!"}
|
|
|
logging.debug('魔数检查完成!')
|
|
|
frameRate = (1/60)*1000
|
|
|
+ readANIH = False
|
|
|
while(True):
|
|
|
chunkName = f.read(4)
|
|
|
- if chunkName == b'LIST':
|
|
|
+ if chunkName == b'LIST' and readANIH:
|
|
|
break
|
|
|
+ if chunkName == b'anih':
|
|
|
+ readANIH = True
|
|
|
chunkSize = int.from_bytes(f.read(4), byteorder='little', signed=False)
|
|
|
if chunkName.lower() == b'rate':
|
|
|
logging.debug('发现自定义速率!')
|