Skip to content

The Free Software Media System - Server Backend & API

Merge branch 'master' into readonlyspan

Bond-0093ff110984a0a
diff --cc MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 18fd53ad6f,0242338b70..3f85f3ecf4
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@@ -1606,25 -1606,41 +1606,41 @@@ namespace MediaBrowser.Controller.Media
}
else
{
- index = outputSizeParam.IndexOf("format", StringComparison.OrdinalIgnoreCase);
+ index = outputSizeParam.IndexOf("hwupload=extra_hw_frames", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
- outputSizeParam = outputSizeParam.Substring(index);
+ outputSizeParam = outputSizeParam.Slice(index);
}
else
{
- index = outputSizeParam.IndexOf("yadif", StringComparison.OrdinalIgnoreCase);
+ index = outputSizeParam.IndexOf("format", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
- outputSizeParam = outputSizeParam.Substring(index);
+ outputSizeParam = outputSizeParam.Slice(index);
}
else
{
- index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
+ index = outputSizeParam.IndexOf("yadif", StringComparison.OrdinalIgnoreCase);
if (index != -1)
{
- outputSizeParam = outputSizeParam.Substring(index);
+ outputSizeParam = outputSizeParam.Slice(index);
}
+ else
+ {
+ index = outputSizeParam.IndexOf("scale", StringComparison.OrdinalIgnoreCase);
+ if (index != -1)
+ {
+ outputSizeParam = outputSizeParam.Substring(index);
+ }
+ else
+ {
+ index = outputSizeParam.IndexOf("vpp", StringComparison.OrdinalIgnoreCase);
+ if (index != -1)
+ {
+ outputSizeParam = outputSizeParam.Substring(index);
+ }
+ }
+ }
}
}
}
@@@ -2088,9 -2115,12 +2115,12 @@@
}
// Add software deinterlace filter before scaling filter
- if (state.DeInterlace("h264", true) || state.DeInterlace("h265", true) || state.DeInterlace("hevc", true))
+ if (state.DeInterlace("h264", true)
+ || state.DeInterlace("avc", true)
+ || state.DeInterlace("h265", true)
+ || state.DeInterlace("hevc", true))
{
- var deintParam = string.Empty;
+ string deintParam;
var inputFramerate = videoStream?.RealFrameRate;
// If it is already 60fps then it will create an output framerate that is much too high for roku and others to handle