diff options
| author | rkevin <[email protected]> | 2019-11-05 01:26:20 -0800 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-11-19 21:06:28 -0500 |
| commit | 51b314331976dcc0d56db72bdf68c14e80000cc9 (patch) | |
| tree | 91c45c00d8289b8d8c0f15a3a496856b7275a20a /discord/oggparse.py | |
| parent | Update regex to fetch URLs to match the official client. (diff) | |
| download | discord.py-51b314331976dcc0d56db72bdf68c14e80000cc9.tar.xz discord.py-51b314331976dcc0d56db72bdf68c14e80000cc9.zip | |
Fix OggStream "invalid header magic" at end of stream
Diffstat (limited to 'discord/oggparse.py')
| -rw-r--r-- | discord/oggparse.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/oggparse.py b/discord/oggparse.py index 6f50502f..15db4595 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -77,6 +77,8 @@ class OggStream: head = self.stream.read(4) if head == b'OggS': return OggPage(self.stream) + elif not head: + return None else: raise OggError('invalid header magic') |