mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-11-21 21:35:33 +00:00
Backport pull request #18578 from jellyfin/release-12.z
Fix audio gaps when restarting HLS with copied video
Original-merge: 54e4dbb4fe
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
1 parent
791ec9f8dc
commit
6042f4809e
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