chore: agentic upgrade
This commit is contained in:
@@ -354,18 +354,23 @@ async def apply_silence_cuts(
|
||||
proc = await asyncio.create_subprocess_exec(
|
||||
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
||||
)
|
||||
progress_task = asyncio.create_task(
|
||||
_forward_ffmpeg_progress(
|
||||
proc.stdout,
|
||||
duration_seconds=output_duration_seconds,
|
||||
on_progress=on_progress,
|
||||
progress_stage="applying_cuts",
|
||||
)
|
||||
)
|
||||
stderr_stream = getattr(proc, "stderr", None)
|
||||
stderr_task = asyncio.create_task(
|
||||
proc.stderr.read() if proc.stderr is not None else asyncio.sleep(0, result=b"")
|
||||
stderr_stream.read() if stderr_stream is not None else asyncio.sleep(0, result=b"")
|
||||
)
|
||||
await asyncio.gather(progress_task, stderr_task)
|
||||
if on_progress is not None:
|
||||
stdout_stream = getattr(proc, "stdout", None)
|
||||
progress_task = asyncio.create_task(
|
||||
_forward_ffmpeg_progress(
|
||||
stdout_stream,
|
||||
duration_seconds=output_duration_seconds,
|
||||
on_progress=on_progress,
|
||||
progress_stage="applying_cuts",
|
||||
)
|
||||
)
|
||||
await asyncio.gather(progress_task, stderr_task)
|
||||
else:
|
||||
await stderr_task
|
||||
await proc.wait()
|
||||
stderr = stderr_task.result()
|
||||
if proc.returncode != 0:
|
||||
|
||||
Reference in New Issue
Block a user