[PR #12319] [MERGED] Check MaxAudioChannels for directAudioStream candidates #13142

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/12319
Author: @gnattu
Created: 7/22/2024
Status: Merged
Merged: 7/29/2024
Merged by: @Bond-009

Base: masterHead: check-channel-directaudio


📝 Commits (5)

  • 42e09ad Check MaxAudioChannels for directAudioStream candidates
  • 5ef54a4 Fix unit test
  • 9311165 Set correct transcode reason and target channels for unit test
  • 1bca5a7 Match old stream selection behavior
  • 94a706d Fix reason matching

📊 Changes

2 files changed (+25 additions, -7 deletions)

View changed files

📝 MediaBrowser.Model/Dlna/StreamBuilder.cs (+13 -2)
📝 tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs (+12 -5)

📄 Description

The current stream builder logic does not check the channel limit when determining if the audio stream can be directly used, and this can cause some undesired effects:

  • A high channel count surround sound stream might be picked even if a stereo one exists when the user requires stereo audio.

  • The user's preferred audio codec might not be respected during the downmix because the requested codec is now forced to be the same as the original source.

Changes

  • Check TranscodingMaxAudioChannels for directAudioStream candidates
  • Update test cases to reflect this change

Issues


🔄 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/12319 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 7/22/2024 **Status:** ✅ Merged **Merged:** 7/29/2024 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `check-channel-directaudio` --- ### 📝 Commits (5) - [`42e09ad`](https://github.com/jellyfin/jellyfin/commit/42e09ad12dab0f368602faac4bc52b0e34ffd849) Check MaxAudioChannels for directAudioStream candidates - [`5ef54a4`](https://github.com/jellyfin/jellyfin/commit/5ef54a47c8275a2a5a19ec45367526d35bc90a46) Fix unit test - [`9311165`](https://github.com/jellyfin/jellyfin/commit/931116525f64d1db35d69d0540d90b5dcf5d83eb) Set correct transcode reason and target channels for unit test - [`1bca5a7`](https://github.com/jellyfin/jellyfin/commit/1bca5a77d9b179e23d0c6e043f85417a3ec5fcac) Match old stream selection behavior - [`94a706d`](https://github.com/jellyfin/jellyfin/commit/94a706d75b96841b5b79c0ff0b904c3504b3d561) Fix reason matching ### 📊 Changes **2 files changed** (+25 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Model/Dlna/StreamBuilder.cs` (+13 -2) 📝 `tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs` (+12 -5) </details> ### 📄 Description The current stream builder logic does not check the channel limit when determining if the audio stream can be directly used, and this can cause some undesired effects: - A high channel count surround sound stream might be picked even if a stereo one exists when the user requires stereo audio. - The user's preferred audio codec might not be respected during the downmix because the requested codec is now forced to be the same as the original source. <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> - Check TranscodingMaxAudioChannels for directAudioStream candidates - Update test cases to reflect this change **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> --- <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 07:07:53 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13142