From 0cce843f07919deb8a6e4fe15ff5c5cb46089f11 Mon Sep 17 00:00:00 2001 From: crobibero Date: Tue, 16 Feb 2021 19:14:17 -0700 Subject: [PATCH] Fix vpp null reference --- MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 3b7ae4c32..fa9222023 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -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)) {