mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-11-20 04:52:51 +00:00
Fix audio gaps when restarting HLS with copied video
This commit is contained in:
1 parent
83d0d0e7f7
commit
f959bed34f
2 files changed
+99
No files matched your search
@@ -3116,6 +3116,16 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
seekParam += string.Format(CultureInfo.InvariantCulture, "-ss {0}", _mediaEncoder.GetTimeParameter(seekTick));
|
||||
|
||||
// Retain audio from the preceding keyframe to match copied video's start time.
|
||||
if (isHlsRemuxing
|
||||
&& state.AudioStream is not null
|
||||
&& !string.IsNullOrEmpty(state.OutputAudioCodec)
|
||||
&& !IsCopyCodec(state.OutputAudioCodec)
|
||||
&& !string.Equals(state.InputContainer, "wtv", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
seekParam += " -noaccurate_seek";
|
||||
}
|
||||
}
|
||||
|
||||
return seekParam;
|
||||
|
||||
Reference in new issue
Block a user