Преглед на файлове

Merge pull request #4905 from BaronGreenback/streamingHelper

Null exception fix

(cherry picked from commit 9a10a18db1654d5180267f03c72e45abd21165ce)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Bond-009 преди 4 години
родител
ревизия
34053b7259
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      Jellyfin.Api/Helpers/StreamingHelpers.cs

+ 1 - 0
Jellyfin.Api/Helpers/StreamingHelpers.cs

@@ -210,6 +210,7 @@ namespace Jellyfin.Api.Helpers
                         && !state.VideoRequest.MaxHeight.HasValue;
                         && !state.VideoRequest.MaxHeight.HasValue;
 
 
                     if (isVideoResolutionNotRequested
                     if (isVideoResolutionNotRequested
+                        && state.VideoStream != null
                         && state.VideoRequest.VideoBitRate.HasValue
                         && state.VideoRequest.VideoBitRate.HasValue
                         && state.VideoStream.BitRate.HasValue
                         && state.VideoStream.BitRate.HasValue
                         && state.VideoRequest.VideoBitRate.Value >= state.VideoStream.BitRate.Value)
                         && state.VideoRequest.VideoBitRate.Value >= state.VideoStream.BitRate.Value)