https://github.com/jellyfin/jellyfin/pull/2184
This commit is contained in:
artiume 2020-01-16 12:51:34 -05:00 committed by GitHub
parent a40cb7bbd8
commit 0cbae4a06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2750,6 +2750,8 @@ namespace MediaBrowser.Controller.MediaEncoding
args += " -mpegts_m2ts_mode 1";
}
var supportsGlobalHeaderFlag = state.OutputContainer != "mkv";
if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase))
{
if (state.VideoStream != null
@ -2770,7 +2772,12 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!state.RunTimeTicks.HasValue)
{
args += " -flags -global_header -fflags +genpts";
if(supportsGlobalHeaderFlag)
{
args += " -flags -global_header";
}
args += " -fflags +genpts";
}
}
else
@ -2816,7 +2823,7 @@ namespace MediaBrowser.Controller.MediaEncoding
args += " " + qualityParam.Trim();
}
if (!state.RunTimeTicks.HasValue)
if (supportsGlobalHeaderFlag && !state.RunTimeTicks.HasValue)
{
args += " -flags -global_header";
}