aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/Hls/VideoHlsService.cs')
-rw-r--r--MediaBrowser.Api/Playback/Hls/VideoHlsService.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
index 534727267..2066849ae 100644
--- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
@@ -206,13 +206,16 @@ namespace MediaBrowser.Api.Playback.Hls
var framerate = state.VideoRequest.Framerate ?? 0;
// We have to supply a framerate for hls, so if it's null, account for that here
- if (framerate.Equals(0))
- {
- framerate = state.VideoStream.AverageFrameRate ?? 0;
- }
- if (framerate.Equals(0))
+ if (state.VideoStream != null)
{
- framerate = state.VideoStream.RealFrameRate ?? 0;
+ if (framerate.Equals(0))
+ {
+ framerate = state.VideoStream.AverageFrameRate ?? 0;
+ }
+ if (framerate.Equals(0))
+ {
+ framerate = state.VideoStream.RealFrameRate ?? 0;
+ }
}
if (framerate.Equals(0))
{