We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d730e60 commit 892fd2cCopy full SHA for 892fd2c
src/PIL/MpegImagePlugin.py
@@ -33,11 +33,7 @@ def next(self) -> int:
33
34
def peek(self, bits: int) -> int:
35
while self.bits < bits:
36
- c = self.next()
37
- if c < 0:
38
- self.bits = 0
39
- continue
40
- self.bitbuffer = (self.bitbuffer << 8) + c
+ self.bitbuffer = (self.bitbuffer << 8) + self.next()
41
self.bits += 8
42
return self.bitbuffer >> (self.bits - bits) & (1 << bits) - 1
43
0 commit comments