mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 01:48:52 -07:00
Backport pull request #12931 from jellyfin/release-10.10.z
Set AudioCodec when building stream
Original-merge: a165883999
Merged-by: nielsvanvelzen <nielsvanvelzen@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
d81fec6b7c
commit
9e386ecc27
@ -208,6 +208,14 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
var longBitrate = Math.Min(transcodingBitrate, playlistItem.AudioBitrate ?? transcodingBitrate);
|
||||
playlistItem.AudioBitrate = longBitrate > int.MaxValue ? int.MaxValue : Convert.ToInt32(longBitrate);
|
||||
|
||||
// Pure audio transcoding does not support comma separated list of transcoding codec at the moment.
|
||||
// So just use the AudioCodec as is would be safe enough as the _transcoderSupport.CanEncodeToAudioCodec
|
||||
// would fail so this profile will not even be picked up.
|
||||
if (playlistItem.AudioCodecs.Count == 0 && !string.IsNullOrWhiteSpace(transcodingProfile.AudioCodec))
|
||||
{
|
||||
playlistItem.AudioCodecs = [transcodingProfile.AudioCodec];
|
||||
}
|
||||
}
|
||||
|
||||
playlistItem.TranscodeReasons = transcodeReasons;
|
||||
|
Loading…
Reference in New Issue
Block a user