update buffer

This commit is contained in:
2026-04-03 11:05:42 -03:00
parent 4fef6d732b
commit 4a12eacef7

View File

@@ -10,6 +10,7 @@ Architecture:
import json
import logging
import os
import re
import time
from queue import Queue, Empty
@@ -266,8 +267,11 @@ class StreamManager:
frame_num = start_number
offset = self.current_global_offset
buf = b""
raw_fd = proc.stdout.fileno()
while True:
chunk = proc.stdout.read(4096)
# os.read on the raw fd returns as soon as ANY data is available
# (no Python buffered-IO blocking waiting to fill a buffer)
chunk = os.read(raw_fd, 65536)
if not chunk:
break
buf += chunk