From 51b314331976dcc0d56db72bdf68c14e80000cc9 Mon Sep 17 00:00:00 2001 From: rkevin Date: Tue, 5 Nov 2019 01:26:20 -0800 Subject: [PATCH] Fix OggStream "invalid header magic" at end of stream --- discord/oggparse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/oggparse.py b/discord/oggparse.py index 6f50502f0..15db45951 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')