FF-1246: fixed cpu decoder reported when no decoder

This commit is contained in:
John Andrews
2024-01-31 01:15:18 +13:00
parent a55f4b7568
commit 2a858e1423

View File

@@ -113,9 +113,16 @@ public class FFMpegEncoder
}
}
}
else if(arguments.Any(x => x.Contains(":v:")))
else
{
decoder = "CPU";
var index = arguments.FindIndex(x => x.Contains("-c:v:"));
if (index > 0 && index < arguments.Count - 2)
{
if(arguments[index + 1] != "copy")
decoder = "CPU";
else
OnStatChange?.Invoke("Decoder", "Copy", recordStatistic: false);
}
}
if (decoder != null)