Leave +genpts untouched in GetProgressiveVideoArguments()

This commit is contained in:
The Lynxy 2019-02-23 10:01:41 -05:00 committed by GitHub
parent eb95b025d4
commit 67f399dccf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2436,8 +2436,6 @@ namespace MediaBrowser.Controller.MediaEncoding
if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase)) if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase))
{ {
args += " -flags -global_header -fflags +genpts";
if (state.VideoStream != null && IsH264(state.VideoStream) && if (state.VideoStream != null && IsH264(state.VideoStream) &&
string.Equals(state.OutputContainer, "ts", StringComparison.OrdinalIgnoreCase) && string.Equals(state.OutputContainer, "ts", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(state.VideoStream.NalLengthSize, "0", StringComparison.OrdinalIgnoreCase)) !string.Equals(state.VideoStream.NalLengthSize, "0", StringComparison.OrdinalIgnoreCase))
@ -2449,6 +2447,11 @@ namespace MediaBrowser.Controller.MediaEncoding
{ {
args += " -copyts -avoid_negative_ts disabled -start_at_zero"; args += " -copyts -avoid_negative_ts disabled -start_at_zero";
} }
if (!state.RunTimeTicks.HasValue)
{
args += " -flags -global_header -fflags +genpts";
}
} }
else else
{ {