Add check if output container supports "global_header" flag
This commit is contained in:
parent
06dfa2e687
commit
57aec873d0
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user