diff options
| author | crobibero <cody@robibe.ro> | 2021-02-16 19:14:17 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2021-02-16 19:14:17 -0700 |
| commit | 0cce843f07919deb8a6e4fe15ff5c5cb46089f11 (patch) | |
| tree | 99a807a4d03dea6b26945fa52fa59eb0ce5daeb7 | |
| parent | 91ee1b1d02944c0cd1b935261ebab08973e68260 (diff) | |
Fix vpp null reference
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 6 |
1 files changed, 6 insertions, 0 deletions
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)) { |
