Merge pull request #2784 from ujjwal96/kaitai

Update GIF parser
This commit is contained in:
Maximilian Hils 2018-01-11 14:11:40 +01:00 committed by GitHub
commit b7db304dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,9 +35,11 @@ class Gif(KaitaiStruct):
self.global_color_table = self._root.ColorTable(io, self, self._root) self.global_color_table = self._root.ColorTable(io, self, self._root)
self.blocks = [] self.blocks = []
while not self._io.is_eof(): while True:
self.blocks.append(self._root.Block(self._io, self, self._root)) _ = self._root.Block(self._io, self, self._root)
self.blocks.append(_)
if ((self._io.is_eof()) or (_.block_type == self._root.BlockType.end_of_file)) :
break
class ImageData(KaitaiStruct): class ImageData(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None): def __init__(self, _io, _parent=None, _root=None):