diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-11-03 10:59:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-03 10:59:43 +0100 |
| commit | 8fc16043c7c080afd31f67798b74ccdf62eb583c (patch) | |
| tree | c15e0efec8806821fbdef4843c6775dd05ef998f /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 13c70c415a97025881139fbccf7ed6b3b9cd550a (diff) | |
| parent | 599e20ab9b760e6cd8300e8d0e401e1856518db5 (diff) | |
Merge pull request #4405 from nyanmisaka/aac-directstream
Fix AAC direct streaming
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 996b1b5c1..33256e4bf 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2675,9 +2675,10 @@ namespace MediaBrowser.Controller.MediaEncoding state.MediaSource = mediaSource; var request = state.BaseRequest; - if (!string.IsNullOrWhiteSpace(request.AudioCodec)) + var supportedAudioCodecs = state.SupportedAudioCodecs; + if (request != null && supportedAudioCodecs != null && supportedAudioCodecs.Length > 0) { - var supportedAudioCodecsList = request.AudioCodec.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + var supportedAudioCodecsList = supportedAudioCodecs.ToList(); ShiftAudioCodecsIfNeeded(supportedAudioCodecsList, state.AudioStream); |
