Browse Source

fix hls session when starting with very short content (#1400)

pull/1401/head
Jason Dove 2 years ago committed by GitHub
parent
commit
cb43c28d00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      ErsatzTV.Application/Streaming/HlsSessionWorker.cs

7
ErsatzTV.Application/Streaming/HlsSessionWorker.cs

@ -237,6 +237,13 @@ public class HlsSessionWorker : IHlsSessionWorker
_workAheadState = HlsSessionWorkAheadState.SeekAndRealtime; _workAheadState = HlsSessionWorkAheadState.SeekAndRealtime;
} }
// this happens when we initially transcode (at max speed) insufficient content to work
// in realtime yet, so we need to reset to max speed
if (!realtime && _workAheadState is not HlsSessionWorkAheadState.MaxSpeed)
{
_workAheadState = HlsSessionWorkAheadState.MaxSpeed;
}
_logger.LogInformation("Work ahead state: {State}", _workAheadState); _logger.LogInformation("Work ahead state: {State}", _workAheadState);
DateTimeOffset now = (_firstProcess || _workAheadState is HlsSessionWorkAheadState.MaxSpeed) DateTimeOffset now = (_firstProcess || _workAheadState is HlsSessionWorkAheadState.MaxSpeed)

Loading…
Cancel
Save