fix: resolve low-storage deadlock by always resuming MP4 finalization
Under the Red storage tier, MP4 finalization (TS->MP4 remux) was being skipped, so tasks never reached Completed and the segment_completed event script — which uploads the file and deletes the local source to free space — never ran. The disk could never recover, deadlocking all recording and transcoding. Two reversed checks caused this: (1) FfmpegService gated finalization on the legacy HasEnoughSpace MB threshold (effectively 4GB) instead of the tier system, and (2) the polling loop only resumed paused finalizations when NOT in the Red tier. Now finalization is gated solely on ShouldPauseActive (true Red only) and the polling loop always attempts to resume it every cycle, since finalization is the very mechanism that frees space. Once any segment finalizes, the upload+delete script runs and the disk recovers, letting the rest finish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1383,7 +1383,7 @@ public sealed partial class FfmpegService
|
||||
IsLowStoragePauseError(finalizationError) ? SystemLogLevel.Warning : SystemLogLevel.Warning,
|
||||
"FFmpeg",
|
||||
IsLowStoragePauseError(finalizationError)
|
||||
? "Segment MP4 finalization paused because storage is below threshold."
|
||||
? "Segment MP4 finalization paused because storage tier is Red."
|
||||
: "Segment MP4 finalization failed after rollover.",
|
||||
finalizationError,
|
||||
session.LiveRoomId,
|
||||
|
||||
Reference in New Issue
Block a user