Fallback to no HWA when reporting transcoding info
This commit is contained in:
parent
bfc27e494b
commit
3bf83025f2
|
@ -458,9 +458,12 @@ namespace Jellyfin.Api.Helpers
|
|||
var audioCodec = state.ActualOutputAudioCodec;
|
||||
var videoCodec = state.ActualOutputVideoCodec;
|
||||
var hardwareAccelerationTypeString = _serverConfigurationManager.GetEncodingOptions().HardwareAccelerationType;
|
||||
HardwareEncodingType? hardwareAccelerationType = string.IsNullOrEmpty(hardwareAccelerationTypeString)
|
||||
? null
|
||||
: (HardwareEncodingType)Enum.Parse(typeof(HardwareEncodingType), hardwareAccelerationTypeString, true);
|
||||
HardwareEncodingType? hardwareAccelerationType = null;
|
||||
if (!string.IsNullOrEmpty(hardwareAccelerationTypeString)
|
||||
&& Enum.TryParse<HardwareEncodingType>(hardwareAccelerationTypeString, out var parsedHardwareAccelerationType))
|
||||
{
|
||||
hardwareAccelerationType = parsedHardwareAccelerationType;
|
||||
}
|
||||
|
||||
_sessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user