diff options
| author | Vasily <JustAMan@users.noreply.github.com> | 2019-10-27 16:47:00 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-27 16:47:00 +0300 |
| commit | dd7ae7747e770ef4545fbe6aeb5b1ab327a3550a (patch) | |
| tree | 75bc047d5d96e7bd025bc66407c860748bece0e8 | |
| parent | 3743137c312581412c00c29907f7c8c2ca884ffc (diff) | |
Apply suggestions from code review
Co-Authored-By: Bond-009 <bond.009@outlook.com>
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 7bfe0e0ce..3fc1e099f 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -321,6 +321,7 @@ namespace MediaBrowser.Api.Playback } Logger.LogDebug("StartFfMpeg() finished successfully"); + return transcodingJob; } diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 709069153..9654af463 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -504,6 +504,7 @@ namespace MediaBrowser.Api.Playback.Hls continue; // avoid unnecessary waiting if segment just became available } } + await Task.Delay(100, cancellationToken).ConfigureAwait(false); } @@ -923,7 +924,8 @@ namespace MediaBrowser.Api.Playback.Hls } else { - var keyFrameArg = string.Format(CultureInfo.InvariantCulture, + var keyFrameArg = string.Format( + CultureInfo.InvariantCulture, " -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"", GetStartNumber(state) * state.SegmentLength, state.SegmentLength); @@ -934,7 +936,8 @@ namespace MediaBrowser.Api.Playback.Hls // Example: we encoded half of desired length, then codec detected // scene cut and inserted a keyframe; next forced keyframe would // be created outside of segment, which breaks seeking. - keyFrameArg += string.Format(CultureInfo.InvariantCulture, + keyFrameArg += string.Format( + CultureInfo.InvariantCulture, " -g {0} -keyint_min {0}", (int)(state.SegmentLength * state.TargetFramerate) ); |
