Merge pull request #5251 from crobibero/vpp-null-ref

Fix vpp null reference
This commit is contained in:
Bond-009 2021-02-17 10:07:54 +01:00 committed by GitHub
commit 467cd9227e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,12 @@ namespace MediaBrowser.Controller.MediaEncoding
private bool IsVppTonemappingSupported(EncodingJobInfo state, EncodingOptions options)
{
var videoStream = state.VideoStream;
if (videoStream == null)
{
// Remote stream doesn't have media info, disable vpp tonemapping.
return false;
}
var codec = videoStream.Codec;
if (string.Equals(options.HardwareAccelerationType, "vaapi", StringComparison.OrdinalIgnoreCase))
{