[PR #4905] [MERGED] Null exception fix #10328

Closed
opened 2026-02-07 06:18:18 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/4905
Author: @BaronGreenback
Created: 1/1/2021
Status: Merged
Merged: 1/1/2021
Merged by: @Bond-009

Base: masterHead: streamingHelper


📝 Commits (1)

  • 11700db Update StreamingHelpers.cs

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 Jellyfin.Api/Helpers/StreamingHelpers.cs (+1 -0)

📄 Description

Came across it during dlna server debugging last night. Not that clued up with what this code actually does (yet) - but it's something to do with playback.

state.VideoStream is a variable that can be null (definition not nullable yet), but there isn't a null check before the state.VideoStream.BitRate.HasValue check, causing an exception. Checks on state.VideoStream's nullable state seem to appear everywhere else.

                        && state.VideoStream != null
                        && state.VideoRequest.VideoBitRate.HasValue
                        && state.VideoStream.BitRate.HasValue

adding this check, permits the playback to start.

Admittedly, i am using a codebase which is somewhat modified from 10.7's, but this looks to be possible in the current code base.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/4905 **Author:** [@BaronGreenback](https://github.com/BaronGreenback) **Created:** 1/1/2021 **Status:** ✅ Merged **Merged:** 1/1/2021 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `streamingHelper` --- ### 📝 Commits (1) - [`11700db`](https://github.com/jellyfin/jellyfin/commit/11700db3123242eda03d72e1aca0740592005f4b) Update StreamingHelpers.cs ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Api/Helpers/StreamingHelpers.cs` (+1 -0) </details> ### 📄 Description Came across it during dlna server debugging last night. Not that clued up with what this code actually does (yet) - but it's something to do with playback. state.VideoStream is a variable that can be null (definition not nullable yet), but there isn't a null check before the _state.VideoStream.BitRate.HasValue_ check, causing an exception. Checks on state.VideoStream's nullable state seem to appear everywhere else. ``` && state.VideoStream != null && state.VideoRequest.VideoBitRate.HasValue && state.VideoStream.BitRate.HasValue ``` adding this check, permits the playback to start. Admittedly, i am using a codebase which is somewhat modified from 10.7's, but this looks to be possible in the current code base. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:18:18 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10328