Catch empty bytes (#14521)

This commit is contained in:
Nicolas Mowen
2024-10-22 19:07:54 -05:00
committed by GitHub
parent ad308252a1
commit d715a8c290
+1 -1
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: