mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
add IgnoreDts option
This commit is contained in:
@@ -1517,12 +1517,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
inputModifier += " " + GetFastSeekCommandLineParameter(state.BaseRequest);
|
||||
inputModifier = inputModifier.Trim();
|
||||
|
||||
//inputModifier += " -fflags +genpts+ignidx+igndts";
|
||||
//if (state.IsVideoRequest && genPts)
|
||||
//{
|
||||
// inputModifier += " -fflags +genpts";
|
||||
//}
|
||||
|
||||
if (!string.IsNullOrEmpty(state.InputAudioSync))
|
||||
{
|
||||
inputModifier += " -async " + state.InputAudioSync;
|
||||
@@ -1538,6 +1532,21 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
inputModifier += " -re";
|
||||
}
|
||||
|
||||
var flags = new List<string>();
|
||||
if (state.IgnoreDts)
|
||||
{
|
||||
flags.Add("+igndts");
|
||||
}
|
||||
if (state.IgnoreIndex)
|
||||
{
|
||||
flags.Add("+ignidx");
|
||||
}
|
||||
|
||||
if (flags.Count > 0)
|
||||
{
|
||||
inputModifier += " -fflags " + string.Join("", flags.ToArray());
|
||||
}
|
||||
|
||||
var videoDecoder = GetVideoDecoder(state, encodingOptions);
|
||||
if (!string.IsNullOrWhiteSpace(videoDecoder))
|
||||
{
|
||||
@@ -1633,6 +1642,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
state.RunTimeTicks = mediaSource.RunTimeTicks;
|
||||
state.RemoteHttpHeaders = mediaSource.RequiredHttpHeaders;
|
||||
state.ReadInputAtNativeFramerate = mediaSource.ReadAtNativeFramerate;
|
||||
state.IgnoreDts = mediaSource.IgnoreDts;
|
||||
|
||||
if (state.ReadInputAtNativeFramerate ||
|
||||
mediaSource.Protocol == MediaProtocol.File && string.Equals(mediaSource.Container, "wtv", StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
Reference in New Issue
Block a user