fixes #219 - [Bug] Missing hardware device reference in convert job with vaapi transcoding

This commit is contained in:
Luke Pulverenti 2016-09-02 00:13:28 -04:00
parent 643bf13bbe
commit c5c8426c20

View File

@ -481,6 +481,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
}
if (state.IsVideoRequest)
{
var encodingOptions = GetEncodingOptions();
var videoEncoder = EncodingJobFactory.GetVideoEncoder(MediaEncoder, state, encodingOptions);
if (videoEncoder.IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1)
{
arg = "-hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device " + encodingOptions.VaapiDevice + " " + arg;
}
}
return arg.Trim();
}