Catch empty bytes (#14521)

This commit is contained in:
Nicolas Mowen 2024-10-22 18:07:54 -06:00 committed by GitHub
parent ad308252a1
commit d715a8c290
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -461,7 +461,7 @@ def recording_clip(
) as ffmpeg: ) as ffmpeg:
while True: while True:
data = ffmpeg.stdout.read(1024) data = ffmpeg.stdout.read(1024)
if data is not None: if data is not None and len(data) > 0:
yield data yield data
else: else:
if ffmpeg.returncode and ffmpeg.returncode != 0: if ffmpeg.returncode and ffmpeg.returncode != 0: