resolve conflicts

pull/3442/head
Nyanmisaka 4 years ago committed by GitHub
parent 17527d68df
commit 7b3f76b81f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1647,57 +1647,26 @@ namespace MediaBrowser.Controller.MediaEncoding
{
outputSizeParam = GetOutputSizeParam(state, options, outputVideoCodec).TrimEnd('"');
var index = outputSizeParam.IndexOf("hwupload,tonemap_opencl", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
else
// All possible beginning of video filters
// Don't break the order
string[] beginOfParam = new[]
{
"hwupload,tonemap_opencl",
"hwupload=extra_hw_frames",
"vpp",
"hwdownload",
"format",
"yadif",
"scale"
};
for (int i = 0, index = -1; i < beginOfParam.Length; i++)
{
index = outputSizeParam.IndexOf("hwdownload", StringComparison.OrdinalIgnoreCase);
index = outputSizeParam.IndexOf(beginOfParam[i], StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
else
{
index = outputSizeParam.IndexOf("hwupload=extra_hw_frames", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
else
{
index = outputSizeParam.IndexOf("format", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
else
{
index = outputSizeParam.IndexOf("yadif", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
else
{
index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
else
{
index = outputSizeParam.IndexOf("vpp", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
outputSizeParam = outputSizeParam.Slice(index);
}
}
}
}
}
break;
}
}
}

Loading…
Cancel
Save