#155 Update example(s)

This commit is contained in:
kokarare1212 2022-09-30 08:06:50 +09:00
parent dc90219442
commit 3d04f359d0
No known key found for this signature in database
GPG Key ID: 0DEF4BD04A8D7E97
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ def play(track_id_str: str):
stderr=subprocess.DEVNULL,
)
while True:
byte = stream.input_stream.stream().read()
byte = stream.input_stream.stream().read(1)
if byte == -1:
return
ffplay.stdin.write(bytes([byte]))

View File

@ -110,7 +110,7 @@ def response(client: socket.socket, uri: str, header: dict,
if (stream.input_stream.stream().pos() >=
stream.input_stream.stream().size()):
break
byte = stream.input_stream.stream().read()
byte = stream.input_stream.stream().read(1)
client.send(bytes([byte]))
return "", [], b"", True
else: